Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ on Google Cloud Platform.
* [Google Cloud Prediction API](#google-cloud-prediction-api)
* [Google Cloud Speech API (Beta)](#google-cloud-speech-api-beta)
* [Google Translate API](#google-translate-api)
* [Google Video Intelligence API](#google-video-intelligence-api)
* [Google Cloud Vision API](#google-cloud-vision-api)
* [**Management Tools**](#management-tools)
* [Stackdriver Debugger](#stackdriver-debugger)
Expand Down Expand Up @@ -236,7 +237,7 @@ consistent and scalable relational database service.
View the [Cloud Spanner Node.js samples][spanner_samples].

[spanner_docs]: https://cloud.google.com/spanner/docs/
[spanner_samples]: spanner
[spanner_samples]: https://github.com/googleapis/nodejs-spanner/tree/master/samples

#### Google Cloud Datastore

Expand Down Expand Up @@ -332,7 +333,17 @@ text between thousands of language pairs.
View the [Translate API Node.js samples][translate_samples].

[translate_docs]: https://cloud.google.com/translate/docs/
[translate_samples]: translate
[translate_samples]: https://github.com/googleapis/nodejs-translate/tree/master/samples

#### Google Cloud Video Intelligence API

The [Cloud Video Intelligence API][video_intelligence_docs] allows developers to
use Google video analysis technology as part of their applications.

View the [Cloud Video Intelligence API Node.js samples][video_intelligence_samples].

[video_intelligence_docs]: https://cloud.google.com/video-intelligence/docs/
[video_intelligence_samples]: https://github.com/googleapis/nodejs-video-intelligence/tree/master/samples

#### Google Cloud Vision API

Expand Down
4 changes: 0 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ deployment:
- node scripts/build "prediction"
- node scripts/build "pubsub"
- node scripts/build "resource"
- node scripts/build "spanner"
- node scripts/build "speech"
- node scripts/build "storage-transfer"
- node scripts/build "trace"
- node scripts/build "translate"
# TODO: This build times out. Does video need more than 10 minutes?
# - node scripts/build "video"
- node scripts/build "vision"
144 changes: 4 additions & 140 deletions spanner/README.md
Original file line number Diff line number Diff line change
@@ -1,141 +1,5 @@
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# Cloud Spanner: Node.js Samples

[![Build](https://storage.googleapis.com/.svg)]()

[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

* [Setup](#setup)
* [Samples](#samples)
* [Schema](#schema)
* [CRUD](#crud)
* [Indexing](#indexing)
* [Transactions](#transactions)
* [Running the tests](#running-the-tests)

## Setup


## Samples

### Schema

View the [documentation][schema_0_docs] or the [source code][schema_0_code].

__Usage:__ `node schema.js --help`

```
Commands:
createDatabase <instanceName> <databaseName> Creates an example database with two tables in a Cloud Spanner instance.
addColumn <instanceName> <databaseName> Adds an example MarketingBudget column to an example Cloud Spanner
table.
queryNewColumn <instanceName> <databaseName> Executes a read-only SQL query against an example Cloud Spanner table
with an additional column (MarketingBudget) added by addColumn.

Options:
--help Show help [boolean]

Examples:
node schema.js createDatabase "my-instance" "my-database"
node schema.js addColumn "my-instance" "my-database"
node schema.js queryNewColumn "my-instance" "my-database"

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 [documentation][crud_1_docs] or the [source code][crud_1_code].

__Usage:__ `node crud.js --help`

```
Commands:
update <instanceName> <databaseName> Modifies existing rows of data in an example Cloud Spanner table.
query <instanceName> <databaseName> Executes a read-only SQL query against an example Cloud Spanner table.
insert <instanceName> <databaseName> Inserts new rows of data into an example Cloud Spanner table.
read <instanceName> <databaseName> Reads data in an example Cloud Spanner table.
read-stale <instanceName> <databaseName> Reads data in an example Cloud Spanner table.

Options:
--help Show help [boolean]

Examples:
node crud.js update "my-instance" "my-database"
node crud.js query "my-instance" "my-database"
node crud.js insert "my-instance" "my-database"
node crud.js read "my-instance" "my-database"

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 [documentation][indexing_2_docs] or the [source code][indexing_2_code].

__Usage:__ `node indexing.js --help`

```
Commands:
createIndex <instanceName> <databaseName> Creates a new index in an example Cloud Spanner table.
createStoringIndex <instanceName> <databaseName> Creates a new value-storing index in an example Cloud Spanner table.
queryIndex <instanceName> <databaseName> 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').
readIndex <instanceName> <databaseName> Reads data from an example Cloud Spanner table using an existing
index.
readStoringIndex <instanceName> <databaseName> Reads data from an example Cloud Spanner table using an existing
storing index.

Options:
--help Show help [boolean]

Examples:
node indexing.js createIndex "my-instance" "my-database"
node indexing.js createStoringIndex "my-instance" "my-database"
node indexing.js queryIndex "my-instance" "my-database"
node indexing.js readIndex "my-instance" "my-database"
node indexing.js readStoringIndex "my-instance" "my-database"

For more information, see https://cloud.google.com/spanner/docs
```

[indexing_2_docs]: https://cloud.google.com/spanner/docs
[indexing_2_code]: indexing.js

### Transactions

View the [documentation][transaction_3_docs] or the [source code][transaction_3_code].

__Usage:__ `node transaction.js --help`

```
Commands:
readOnly <instanceName> <databaseName> Execute a read-only transaction on an example Cloud Spanner table.
readWrite <instanceName> <databaseName> Execute a read-write transaction on an example Cloud Spanner table.

Options:
--help Show help [boolean]

Examples:
node transaction.js readOnly "my-instance" "my-database"
node transaction.js readWrite "my-instance" "my-database"

For more information, see https://cloud.google.com/spanner/docs
```

[transaction_3_docs]: https://cloud.google.com/spanner/docs
[transaction_3_code]: transaction.js

## Running the tests
Samples for the [Google Cloud Spanner Node.js Client][client] have moved to
[github.com/googleapis/nodejs-spanner/tree/master/samples/][samples].

[client]: https://github.com/googleapis/nodejs-spanner
[samples]: https://github.com/googleapis/nodejs-spanner/tree/master/samples
Loading