Skip to content

docs(samples): updated samples code to use async await#1

Open
praveenqlogic wants to merge 4 commits intomasterfrom
nodejs-bigtable-tb-01
Open

docs(samples): updated samples code to use async await#1
praveenqlogic wants to merge 4 commits intomasterfrom
nodejs-bigtable-tb-01

Conversation

@praveenqlogic
Copy link
Copy Markdown
Owner

Fixes googleapis/google-cloud-node#2869 (it's a good idea to open an issue first for discussion)
Fixes https://github.com/googleapis/nodejs-bigtable

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Comment thread samples/document-snippets/cluster.js Outdated
Comment thread samples/document-snippets/cluster.js Outdated
Comment thread samples/document-snippets/cluster.js Outdated
Comment thread samples/document-snippets/cluster.js Outdated
Comment thread samples/document-snippets/cluster.js Outdated
Comment thread samples/document-snippets/table.js Outdated
Comment thread samples/document-snippets/table.js Outdated
Comment thread samples/document-snippets/table.js Outdated
Comment thread samples/document-snippets/table.js Outdated
Comment thread samples/document-snippets/instance.js
.catch(err => {
// Handle the error.
});
const [clusterResponse, apiResponse] = await cluster.get();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry,
Missed clusterResponse->clusterInstance please

Comment thread samples/document-snippets/family.js Outdated

createRules: (instanceId, tableId) => {
createRules: async (instanceId, tableId) => {
const Bigtable = require('@google-cloud/bigtable');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please move the [START ...] tag above this line

const snippets = {
createRow: (instanceId, tableId) => {
createRow: async (instanceId, tableId) => {
const Bigtable = require('@google-cloud/bigtable');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please move the [START ...] tag above this line

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

done


const snippets = {
createRow: (instanceId, tableId) => {
createRow: async (instanceId, tableId) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lines 52, 53: If the targeted cell is unset, it will be treated as a containing an
// empty string. Please rephrase it to "If the targeted cell is unset, it will be treated as a cell containing an empty string." Search and change everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update all samples to use async/await

3 participants