diff --git a/.cloud-repo-tools.json b/.cloud-repo-tools.json
deleted file mode 100644
index a19daca57..000000000
--- a/.cloud-repo-tools.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "requiresKeyFile": true,
- "requiresProjectId": true,
- "product": "spanner",
- "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/spanner/latest/",
- "release_quality": "ga",
- "samples": [
- {
- "id": "schema",
- "name": "Schema",
- "file": "schema.js",
- "docs_link": "https://cloud.google.com/spanner/docs",
- "usage": "node schema.js --help"
- },
- {
- "id": "crud",
- "name": "CRUD",
- "file": "crud.js",
- "docs_link": "https://cloud.google.com/spanner/docs",
- "usage": "node crud.js --help"
- },
- {
- "id": "indexing",
- "name": "Indexing",
- "file": "indexing.js",
- "docs_link": "https://cloud.google.com/spanner/docs",
- "usage": "node indexing.js --help"
- },
- {
- "id": "transaction",
- "name": "Transactions",
- "file": "transaction.js",
- "docs_link": "https://cloud.google.com/spanner/docs",
- "usage": "node transaction.js --help"
- }
- ]
-}
diff --git a/.gitignore b/.gitignore
index dc787c46e..d532fa721 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ google-cloud-logging-bunyan-*.tgz
package-lock.json
.vscode
yarn.lock
+__pycache__
diff --git a/.readme-partials.yml b/.readme-partials.yml
new file mode 100644
index 000000000..1e9df3410
--- /dev/null
+++ b/.readme-partials.yml
@@ -0,0 +1,4 @@
+introduction: |-
+ [Cloud Spanner](https://cloud.google.com/spanner/docs/) is a fully managed, mission-critical, relational database service that
+ offers transactional consistency at global scale, schemas, SQL (ANSI 2011 with extensions),
+ and automatic, synchronous replication for high availability.
diff --git a/.repo-metadata.json b/.repo-metadata.json
new file mode 100644
index 000000000..a5bb55095
--- /dev/null
+++ b/.repo-metadata.json
@@ -0,0 +1,14 @@
+{
+ "name": "spanner",
+ "name_pretty": "Cloud Spanner",
+ "product_documentation": "https://cloud.google.com/spanner/docs/",
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/spanner/latest/",
+ "issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
+ "release_level": "ga",
+ "language": "nodejs",
+ "repo": "googleapis/nodejs-spanner",
+ "distribution_name": "@google-cloud/spanner",
+ "api_id": "spanner.googleapis.com",
+ "requires_billing": true
+}
+
diff --git a/README.md b/README.md
index 34e408a95..d82cdd4b7 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,24 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
-[//]: # "To regenerate it, use `npm run generate-scaffolding`."
+[//]: # "To regenerate it, use `python -m synthtool`."
# [Cloud Spanner: Node.js Client](https://github.com/googleapis/nodejs-spanner)
-[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
+[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/spanner.svg)](https://www.npmjs.org/package/@google-cloud/spanner)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-spanner/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-spanner)
-> Node.js idiomatic client for [Cloud Spanner][product-docs].
-[Cloud Spanner](https://cloud.google.com/spanner/docs/) is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, schemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication for high availability.
+
+
+[Cloud Spanner](https://cloud.google.com/spanner/docs/) is a fully managed, mission-critical, relational database service that
+offers transactional consistency at global scale, schemas, SQL (ANSI 2011 with extensions),
+and automatic, synchronous replication for high availability.
* [Cloud Spanner Node.js Client API Reference][client-docs]
-* [github.com/googleapis/nodejs-spanner](https://github.com/googleapis/nodejs-spanner)
* [Cloud Spanner Documentation][product-docs]
+* [github.com/googleapis/nodejs-spanner](https://github.com/googleapis/nodejs-spanner)
Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
@@ -24,6 +27,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
**Table of contents:**
+
* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)
@@ -37,72 +41,46 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
### Before you begin
-1. Select or create a Cloud Platform project.
+1. [Select or create a Cloud Platform project][projects].
+1. [Enable billing for your project][billing].
+1. [Enable the Cloud Spanner API][enable_api].
+1. [Set up authentication with a service account][auth] so you can access the
+ API from your local workstation.
- [Go to the projects page][projects]
+### Installing the client library
-1. Enable billing for your project.
+```bash
+npm install @google-cloud/spanner
+```
- [Enable billing][billing]
-1. Enable the Cloud Spanner API.
+### Using the client library
- [Enable the API][enable_api]
+```javascript
+ // Imports the Google Cloud client library
+ const {Spanner} = require('@google-cloud/spanner');
-1. [Set up authentication with a service account][auth] so you can access the
- API from your local workstation.
+ // Creates a client
+ const spanner = new Spanner({projectId});
-[projects]: https://console.cloud.google.com/project
-[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
-[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=spanner.googleapis.com
-[auth]: https://cloud.google.com/docs/authentication/getting-started
+ // Gets a reference to a Cloud Spanner instance and database
+ const instance = spanner.instance(instanceId);
+ const database = instance.database(databaseId);
-### Installing the client library
+ // The query to execute
+ const query = {
+ sql: 'SELECT 1',
+ };
- npm install --save @google-cloud/spanner
+ // Execute a simple SQL statement
+ const [rows] = await database.run(query);
+ console.log(`Query: ${rows.length} found.`);
+ rows.forEach(row => console.log(row));
-### Using the client library
-
-```javascript
-// Imports the Google Cloud client library
-const {Spanner} = require('@google-cloud/spanner');
-
-// Your Google Cloud Platform project ID
-const projectId = 'YOUR_PROJECT_ID';
-
-// Creates a client
-const spanner = new Spanner({
- projectId: projectId,
-});
-
-// Your Cloud Spanner instance ID
-const instanceId = 'my-instance';
-
-// Your Cloud Spanner database ID
-const databaseId = 'my-database';
-
-// Gets a reference to a Cloud Spanner instance and database
-const instance = spanner.instance(instanceId);
-const database = instance.database(databaseId);
-
-// The query to execute
-const query = {
- sql: 'SELECT 1',
-};
-
-// Execute a simple SQL statement
-database
- .run(query)
- .then(results => {
- const rows = results[0];
-
- rows.forEach(row => console.log(row));
- })
- .catch(err => {
- console.error('ERROR:', err);
- });
```
+
+
## Samples
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tree/master/samples) directory. The samples' `README.md`
@@ -110,10 +88,17 @@ has instructions for running the samples.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
-| Schema | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/schema.js,samples/README.md) |
+| Batch | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/batch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/batch.js,samples/README.md) |
| CRUD | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/crud.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/crud.js,samples/README.md) |
+| DML | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/dml.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml.js,samples/README.md) |
| Indexing | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/indexing.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/indexing.js,samples/README.md) |
-| Transactions | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/transaction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/transaction.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
+| Schema | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/schema.js,samples/README.md) |
+| Struct | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/struct.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/struct.js,samples/README.md) |
+| Timestamp | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/timestamp.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/timestamp.js,samples/README.md) |
+| Transaction | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/transaction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/transaction.js,samples/README.md) |
+
+
The [Cloud Spanner Node.js Client API Reference][client-docs] documentation
also contains samples.
@@ -122,12 +107,17 @@ also contains samples.
This library follows [Semantic Versioning](http://semver.org/).
+
This library is considered to be **General Availability (GA)**. This means it
is stable; the code surface will not change in backwards-incompatible ways
unless absolutely necessary (e.g. because of critical security issues) or with
an extensive deprecation period. Issues and requests against **GA** libraries
are addressed with the highest priority.
+
+
+
+
More Information: [Google Cloud Platform Launch Stages][launch_stages]
[launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -145,4 +135,7 @@ See [LICENSE](https://github.com/googleapis/nodejs-spanner/blob/master/LICENSE)
[client-docs]: https://cloud.google.com/nodejs/docs/reference/spanner/latest/
[product-docs]: https://cloud.google.com/spanner/docs/
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
-
+[projects]: https://console.cloud.google.com/project
+[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
+[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=spanner.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/package.json b/package.json
index a282661db..21f1fde89 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,6 @@
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"predocs": "npm run compile",
- "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"lint": "eslint samples/ && gts check",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha build/system-test --timeout 600000",
diff --git a/samples/README.md b/samples/README.md
index 06bd78590..414c757aa 100644
--- a/samples/README.md
+++ b/samples/README.md
@@ -1,175 +1,190 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
-[//]: # "To regenerate it, use `npm run generate-scaffolding`."
+[//]: # "To regenerate it, use `python -m synthtool`."
-# Cloud Spanner: Node.js Samples
+# [Cloud Spanner: Node.js Samples](https://github.com/googleapis/nodejs-spanner)
[![Open in Cloud Shell][shell_img]][shell_link]
-[Cloud Spanner](https://cloud.google.com/spanner/docs/) is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, schemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication for high availability.
+[Cloud Spanner](https://cloud.google.com/spanner/docs/) is a fully managed, mission-critical, relational database service that
+offers transactional consistency at global scale, schemas, SQL (ANSI 2011 with extensions),
+and automatic, synchronous replication for high availability.
## Table of Contents
* [Before you begin](#before-you-begin)
* [Samples](#samples)
- * [Schema](#schema)
+ * [Batch](#batch)
* [CRUD](#crud)
+ * [DML](#dml)
* [Indexing](#indexing)
- * [Transactions](#transactions)
+ * [Quickstart](#quickstart)
+ * [Schema](#schema)
+ * [Struct](#struct)
+ * [Timestamp](#timestamp)
+ * [Transaction](#transaction)
## Before you begin
-Before running the samples, make sure you've followed the steps in the
-[Before you begin section](../README.md#before-you-begin) of the client
-library's README.
+Before running the samples, make sure you've followed the steps outlined in
+[Using the client library](https://github.com/googleapis/nodejs-spanner#using-the-client-library).
## Samples
-### Schema
-View the [source code][schema_0_code].
-[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/schema.js,samples/README.md)
+### Batch
+
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/batch.js).
-__Usage:__ `node schema.js --help`
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/batch.js,samples/README.md)
-```
-schema.js
+__Usage:__
-Commands:
- schema.js createDatabase Creates an example database with two tables in a Cloud
- Spanner instance.
- schema.js addColumn Adds an example MarketingBudget column to an example
- Cloud Spanner table.
- schema.js queryNewColumn Executes a read-only SQL query against an example Cloud
- Spanner table with an additional column
- (MarketingBudget) added by addColumn.
-Options:
- --version Show version number [boolean]
- --help Show help [boolean]
+`node batch.js`
+
+
+-----
-Examples:
- node schema.js createDatabase "my-instance" "my-database" "my-project-id"
- node schema.js addColumn "my-instance" "my-database" "my-project-id"
- node schema.js queryNewColumn "my-instance" "my-database" "my-project-id"
-For more information, see https://cloud.google.com/spanner/docs
-```
-[schema_0_docs]: https://cloud.google.com/spanner/docs
-[schema_0_code]: schema.js
### CRUD
-View the [source code][crud_1_code].
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/crud.js).
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/crud.js,samples/README.md)
-__Usage:__ `node crud.js --help`
+__Usage:__
+
+
+`node crud.js`
+
+
+-----
+
+
+
+
+### DML
+
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/dml.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml.js,samples/README.md)
-```
-crud.js
+__Usage:__
-Commands:
- crud.js update Modifies existing rows of data in an example Cloud
- Spanner table.
- crud.js query Executes a read-only SQL query against an example Cloud
- Spanner table.
- crud.js insert Inserts new rows of data into an example Cloud Spanner
- table.
- crud.js read Reads data in an example Cloud Spanner table.
- crud.js read-stale Reads stale data in an example Cloud Spanner table.
-Options:
- --version Show version number [boolean]
- --help Show help [boolean]
+`node dml.js`
+
+
+-----
-Examples:
- node crud.js update "my-instance" "my-database" "my-project-id"
- node crud.js query "my-instance" "my-database" "my-project-id"
- node crud.js insert "my-instance" "my-database" "my-project-id"
- node crud.js read "my-instance" "my-database" "my-project-id"
- node crud.js read-stale "my-instance" "my-database" "my-project-id"
-For more information, see https://cloud.google.com/spanner/docs
-```
-[crud_1_docs]: https://cloud.google.com/spanner/docs
-[crud_1_code]: crud.js
### Indexing
-View the [source code][indexing_2_code].
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/indexing.js).
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/indexing.js,samples/README.md)
-__Usage:__ `node indexing.js --help`
+__Usage:__
+
+
+`node indexing.js`
+
+
+-----
+
+
+
-```
-indexing.js
+### Quickstart
-Commands:
- indexing.js createIndex Creates a new index in an example Cloud Spanner table.
-
- indexing.js createStoringIndex Creates a new value-storing index in an example Cloud
- Spanner table.
- indexing.js queryIndex Executes a read-only SQL query against an example Cloud
- Spanner table using an existing index.
- Returns results with titles between a start title
- (default: 'Ardvark') and an end title (default: 'Goo').
- indexing.js readIndex Reads data from an example Cloud Spanner table using an
- existing index.
- indexing.js readStoringIndex Reads data from an example Cloud Spanner table using an
- existing storing index.
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/quickstart.js).
-Options:
- --version Show version number [boolean]
- --help Show help [boolean]
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)
-Examples:
- node indexing.js createIndex "my-instance" "my-database" "my-project-id"
- node indexing.js createStoringIndex "my-instance" "my-database" "my-project-id"
- node indexing.js queryIndex "my-instance" "my-database" "my-project-id"
- node indexing.js readIndex "my-instance" "my-database" "my-project-id"
- node indexing.js readStoringIndex "my-instance" "my-database" "my-project-id"
+__Usage:__
-For more information, see https://cloud.google.com/spanner/docs
-```
-[indexing_2_docs]: https://cloud.google.com/spanner/docs
-[indexing_2_code]: indexing.js
+`node quickstart.js`
-### Transactions
-View the [source code][transaction_3_code].
+-----
+
+
+
+
+### Schema
+
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/schema.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/schema.js,samples/README.md)
+
+__Usage:__
+
+
+`node schema.js`
+
+
+-----
+
+
+
+
+### Struct
+
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/struct.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/struct.js,samples/README.md)
+
+__Usage:__
+
+
+`node struct.js`
+
+
+-----
+
+
+
+
+### Timestamp
+
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/timestamp.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/timestamp.js,samples/README.md)
+
+__Usage:__
+
+
+`node timestamp.js`
+
+
+-----
+
+
+
+
+### Transaction
+
+View the [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/transaction.js).
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/transaction.js,samples/README.md)
-__Usage:__ `node transaction.js --help`
+__Usage:__
+
-```
-transaction.js
+`node transaction.js`
-Commands:
- transaction.js readOnly Execute a read-only transaction on an example Cloud
- Spanner table.
- transaction.js readWrite Execute a read-write transaction on an example Cloud
- Spanner table.
-Options:
- --version Show version number [boolean]
- --help Show help [boolean]
-Examples:
- node transaction.js readOnly "my-instance" "my-database" "my-project-id"
- node transaction.js readWrite "my-instance" "my-database" "my-project-id"
-For more information, see https://cloud.google.com/spanner/docs
-```
-[transaction_3_docs]: https://cloud.google.com/spanner/docs
-[transaction_3_code]: transaction.js
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/README.md
+[product-docs]: https://cloud.google.com/spanner/docs/
\ No newline at end of file
diff --git a/samples/crud.js b/samples/crud.js
index d7d3ed3be..08bb263e7 100644
--- a/samples/crud.js
+++ b/samples/crud.js
@@ -15,6 +15,9 @@
'use strict';
+// sample-metadata:
+// title: CRUD
+
async function updateData(instanceId, databaseId, projectId) {
// [START spanner_update_data]
// Imports the Google Cloud client library
diff --git a/samples/dml.js b/samples/dml.js
index 13165e44d..46795c779 100644
--- a/samples/dml.js
+++ b/samples/dml.js
@@ -15,6 +15,9 @@
'use strict';
+// sample-metadata:
+// title: DML
+
function insertUsingDml(instanceId, databaseId, projectId) {
// [START spanner_dml_standard_insert]
// Imports the Google Cloud client library
diff --git a/samples/quickstart.js b/samples/quickstart.js
index a3474d987..8927c9680 100644
--- a/samples/quickstart.js
+++ b/samples/quickstart.js
@@ -15,12 +15,12 @@
'use strict';
-// [START spanner_quickstart]
async function quickstart(
projectId = 'YOUR-PROJECT-ID', // Your Google Cloud Platform project ID
instanceId = 'my-instance', // Your Cloud Spanner instance ID
databaseId = 'my-database' // Your Cloud Spanner database ID
) {
+ // [START spanner_quickstart]
// Imports the Google Cloud client library
const {Spanner} = require('@google-cloud/spanner');
@@ -40,8 +40,8 @@ async function quickstart(
const [rows] = await database.run(query);
console.log(`Query: ${rows.length} found.`);
rows.forEach(row => console.log(row));
+ // [END spanner_quickstart]
}
-// [END spanner_quickstart]
const args = process.argv.slice(2);
quickstart(...args).catch(console.error);
diff --git a/synth.metadata b/synth.metadata
index 5d02c3638..e22415917 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,26 +1,26 @@
{
- "updateTime": "2019-05-21T11:24:39.098526Z",
+ "updateTime": "2019-05-31T23:19:46.922728Z",
"sources": [
{
"generator": {
"name": "artman",
- "version": "0.20.0",
- "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec"
+ "version": "0.22.0",
+ "dockerImage": "googleapis/artman@sha256:72f6287a42490bfe1609aed491f29411af21df3f744199fe8bb8d276c1fdf419"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160",
- "internalRef": "249058354"
+ "sha": "152dabdfea620675c2db2f2a74878572324e8fd2",
+ "internalRef": "250713292"
}
},
{
"template": {
"name": "node_library",
"origin": "synthtool.gcp",
- "version": "2019.5.2"
+ "version": "2019.4.10"
}
}
],