Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add browsing data sample #201

Merged
merged 5 commits into from
Sep 4, 2016
Merged

Add browsing data sample #201

merged 5 commits into from
Sep 4, 2016

Conversation

ace-n
Copy link
Contributor

@ace-n ace-n commented Sep 2, 2016

No description provided.

@jmdobry
Copy link
Member

jmdobry commented Sep 2, 2016

This branch didn't get rebased properly, it overwrites a lot of the copyTable code.

@@ -252,7 +266,7 @@ cli
.command('create <dataset> <table>', 'Create a new table in the specified dataset.', {}, function (options) {
program.createTable(utils.pick(options, ['dataset', 'table']), utils.makeHandler());
})
.command('list <dataset>', 'List tables in the specified dataset.', {}, function (options) {
.command('tables <dataset>', 'List tables in the specified dataset.', {}, function (options) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay list to be consistent with all the other sample CLIs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the problem is that we can list both tables and rows - should I use something like list_tables and list_rows instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of having list for listing tables, since the sample is tables.js, and browse for the rows, which matches the sample description "Browse a table.".

node tables list my_dataset
node tables browse my_dataset my_table

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or

node tables list my_dataset
node tables rows my_dataset my_table
or
node tables getRows my_dataset my_table
or
node tables get-rows my_dataset my_table
or
node tables listRows my_dataset my_table
or
node tables list-rows my_dataset my_table

I don't really mind what the CLI command is for running listRows, but I think the command for listing tables should be list for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point taken, will fix.

@codecov-io
Copy link

codecov-io commented Sep 2, 2016

Current coverage is 89.46% (diff: 100%)

Merging #201 into master will increase coverage by 0.15%

@@             master       #201   diff @@
==========================================
  Files            57         57          
  Lines          2423       2431     +8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2164       2175    +11   
+ Misses          259        256     -3   
  Partials          0          0          

Powered by Codecov. Last update 92f033d...83ebd51

// Delete bucket
setTimeout(function () {
storage.bucket(options.bucket).delete(done);
}, 2000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these changes? Don't we still need to delete both srcDataset and destDataset?

@jmdobry
Copy link
Member

jmdobry commented Sep 2, 2016

LGTM after comments are addressed.

@ace-n
Copy link
Contributor Author

ace-n commented Sep 2, 2016

@dpebot merge when green

@dpebot
Copy link
Contributor

dpebot commented Sep 2, 2016

Okay! I'll merge when all statuses are green.

ace-n pushed a commit that referenced this pull request Nov 21, 2022
ace-n pushed a commit that referenced this pull request Nov 21, 2022
kweinmeister pushed a commit that referenced this pull request Jan 11, 2023
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-retail/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants