Skip to content

Commit

Permalink
Added review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vijay-qlogic committed Aug 20, 2018
1 parent 636037e commit 07ba77d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions samples/document-snippets/family.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const snippets = {
// let apiResponse = result[1];
})
.catch(err => {
// handle error
// Handle the error.
});
// [END bigtable_create_family]
callback();
Expand All @@ -46,7 +46,7 @@ const snippets = {
const exists = result[0];
})
.catch(err => {
// handle error
// Handle the error.
});
// [END bigtable_exists_family]
callback();
Expand All @@ -63,12 +63,12 @@ const snippets = {
// const apiResponse = result[1];
})
.catch(err => {
// handle error
// Handle the error.
});
// [END bigtable_get_family]
callback();
},
getMetaData: (instanceId, tableId, familyId, callback) => {
getMetadata: (instanceId, tableId, familyId, callback) => {
const instance = bigtable.instance(instanceId);
const table = instance.table(tableId);
const family = table.family(familyId);
Expand All @@ -80,17 +80,17 @@ const snippets = {
// const apiResponse = result[1];
})
.catch(err => {
// handle error
// Handle the error.
});
// [END bigtable_get_family_meta]
callback();
},
setMetaData: (instanceId, tableId, familyId, callback) => {
setMetadata: (instanceId, tableId, familyId, callback) => {
const instance = bigtable.instance(instanceId);
const table = instance.table(tableId);
const family = table.family(familyId);
// [START bigtable_set_family_meta]
var metadata = {
const metadata = {
rule: {
versions: 2,
union: true,
Expand All @@ -102,7 +102,7 @@ const snippets = {
const apiResponse = result[0];
})
.catch(err => {
// handle error
// Handle the error.
});
// [END bigtable_set_family_meta]
callback();
Expand All @@ -118,7 +118,7 @@ const snippets = {
const apiResponse = result[0];
})
.catch(err => {
// handle error
// Handle the error.
});
// [END bigtable_del_family]
callback();
Expand Down
16 changes: 8 additions & 8 deletions samples/document-snippets/tests/family.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016 Google Inc. All Rights Reserved.
* Copyright 2018 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,9 +21,9 @@ const uuid = require(`uuid`);
const Bigtable = require(`@google-cloud/bigtable`);
const bigtable = new Bigtable();

const INSTANCE_ID = `sample-instance-${uuid.v4()}`.substr(0, 30); // Bigtable naming rules
const CLUSTER_ID = `sample-cluster-${uuid.v4()}`.substr(0, 30); // Bigtable naming rules
const TABLE_ID = `sample-table-${uuid.v4()}`.substr(0, 30); // Bigtable naming rules
const INSTANCE_ID = `nodejs-bigtable-samples-${uuid.v4()}`.substr(0, 30); // Bigtable naming rules
const CLUSTER_ID = `nodejs-bigtable-samples-${uuid.v4()}`.substr(0, 30); // Bigtable naming rules
const TABLE_ID = `nodejs-bigtable-samples-${uuid.v4()}`.substr(0, 30); // Bigtable naming rules
const FAMILY_ID = `sample-family-${uuid.v4()}`.substr(0, 10); // Bigtable naming rules

const familySnippets = require('../family.js');
Expand Down Expand Up @@ -61,12 +61,12 @@ describe('Family Snippets', function() {
familySnippets.getFamily(INSTANCE_ID, TABLE_ID, FAMILY_ID, done);
});

it('should get family meta-data', function(done) {
familySnippets.getMetaData(INSTANCE_ID, TABLE_ID, FAMILY_ID, done);
it('should get family metadata', function(done) {
familySnippets.getMetadata(INSTANCE_ID, TABLE_ID, FAMILY_ID, done);
});

it('should set family meta-data', function(done) {
familySnippets.setMetaData(INSTANCE_ID, TABLE_ID, FAMILY_ID, done);
it('should set family metadata', function(done) {
familySnippets.setMetadata(INSTANCE_ID, TABLE_ID, FAMILY_ID, done);
});

it('should delete family', function(done) {
Expand Down

0 comments on commit 07ba77d

Please sign in to comment.