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

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

praveenqlogic
Copy link
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)

samples/document-snippets/cluster.js Outdated Show resolved Hide resolved
samples/document-snippets/cluster.js Outdated Show resolved Hide resolved
samples/document-snippets/cluster.js Outdated Show resolved Hide resolved
samples/document-snippets/cluster.js Outdated Show resolved Hide resolved
samples/document-snippets/cluster.js Outdated Show resolved Hide resolved
samples/document-snippets/table.js Outdated Show resolved Hide resolved
samples/document-snippets/table.js Outdated Show resolved Hide resolved
samples/document-snippets/table.js Outdated Show resolved Hide resolved
samples/document-snippets/table.js Outdated Show resolved Hide resolved
samples/document-snippets/instance.js Show resolved Hide resolved
.catch(err => {
// Handle the error.
});
const [clusterResponse, apiResponse] = await cluster.get();

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

samples/document-snippets/family.js Outdated Show resolved Hide resolved
// [END bigtable_create_row]
},

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

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

@@ -14,7 +14,7 @@
*/

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

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
Owner Author

Choose a reason for hiding this comment

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

done

@@ -14,7 +14,7 @@
*/

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

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