Skip to content

Commit

Permalink
fix: changes as per comments
Browse files Browse the repository at this point in the history
  • Loading branch information
asthamohta committed Jan 10, 2022
1 parent 069c74c commit 44b9e69
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 17 deletions.
5 changes: 3 additions & 2 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions samples/backups-copy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// sample-metadata:
// title: Read data using an existing index.
// usage: node spannerCopyBackup <INSTANCE_ID> <DATABASE_ID> <PROJECT_ID>

'use strict';

function main(
Expand All @@ -32,7 +28,7 @@ function main(
// const instanceId = 'my-instance';
// const databaseId = 'my-database';
// const backupId = 'my-backup',
// sourceBackupId = 'my-source-backup',
// const sourceBackupId = 'my-source-backup',
// const projectId = 'my-project-id';

// Imports the Google Cloud Spanner client library
Expand All @@ -50,7 +46,7 @@ function main(
const database = instance.database(databaseId);
const sourceBackup = instance.backup(sourceBackupId);

// Expire source and copy backup 14 days in the future
// Expire copy backup 14 days in the future
const expireTime = Spanner.timestamp(
Date.now() + 1000 * 60 * 60 * 24 * 14
).toStruct();
Expand Down
4 changes: 0 additions & 4 deletions samples/index-read-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// sample-metadata:
// title: Read data using an existing index.
// usage: node readDataWithIndex <INSTANCE_ID> <DATABASE_ID> <PROJECT_ID>

'use strict';

function main(
Expand Down
1 change: 0 additions & 1 deletion samples/system-test/spanner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const DEFAULT_LEADER_2 = 'us-east1';

const spanner = new Spanner({
projectId: PROJECT_ID,
apiEndpoint: 'staging-wrenchworks.sandbox.googleapis.com',
});
const LABEL = 'node-sample-tests';
const GAX_OPTIONS = {
Expand Down
2 changes: 1 addition & 1 deletion src/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class Instance extends common.GrpcServiceObject {
): Promise<CopyBackupResponse> | void {
if (!backupId || !sourceBackupId) {
throw new Error(
'A backup ID and source backup ID is required to create a Backup.'
'A backup ID and source backup ID is required to create a copy of the source backup.'
);
}
const copyOfBackup = new Backup(this, backupId, sourceBackupId);
Expand Down

0 comments on commit 44b9e69

Please sign in to comment.