Global

Members

(constant) protos :object

Properties:
Name Type Description
DatabaseAdminClient constructor

Reference to v1.DatabaseAdminClient

InstanceAdminClient constructor

Reference to v1.InstanceAdminClient

SpannerClient constructor

Reference to v1.SpannerClient

Methods

isDatabaseNotFoundError(error) → {boolean}

Checks whether the given error is a 'Database not found' error.

Parameters:
Name Type Description
error Error

The error to check.

isInstanceNotFoundError(error) → {boolean}

Checks whether the given error is an 'Instance not found' error.

Parameters:
Name Type Description
error Error

The error to check.

isSessionNotFoundError(error)

Checks whether the given error is a 'Session not found' error.

Parameters:
Name Type Description
error

the error to check

Type Definitions

BatchCreateSessionsCallback(errnullable, sessions, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

sessions Array.<Session>

The newly created sessions.

apiResponse object

The full API response.

BatchCreateSessionsOptions :object

Properties:
Name Type Attributes Description
count number

The number of sessions to create.

labels object.<string, string> <optional>

Labels to apply to each session.

BatchCreateSessionsResponse :array

Properties:
Name Type Description
0 Array.<Session>

The newly created sessions.

1 object

The full API response.

BatchUpdateCallback(errnullable, rowCounts, apiResponse)

Parameters:
Name Type Attributes Description
err BatchUpdateError <nullable>

Request error, if any.

rowCounts Array.<number>

Affected row counts.

apiResponse object

The full API response.

BatchUpdateError :error

Properties:
Name Type Attributes Description
code number

gRPC status code.

metadata object <nullable>

gRPC metadata.

rowCounts Array.<number>

The affected row counts for any DML statements that were executed successfully before this error occurred.

BatchUpdateResponse :array

Properties:
Name Type Description
0 Array.<number>

Affected row counts.

1 object

The full API response.

CloseDatabaseCallback(errnullable)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

CommitCallback(errornullable, apiResponse)

Parameters:
Name Type Attributes Description
error Error <nullable>

Request error, if any.

apiResponse CommitResponse

The full API response.

CommitPromiseResponse :array

Properties:
Name Type Description
0 CommitResponse

The commit response.

CommitResponse :object

Properties:
Name Type Description
commitTimestamp google.protobuf.Timestamp

The transaction commit timestamp.

CreateBackupCallback(errnullable, backup, operation, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

backup Backup

The new Backup.

operation Operation

An Operation object that can be used to check the status of the request.

apiResponse object

The full API response.

CreateBackupOptions :object

Properties:
Name Type Attributes Description
databasePath string

The database path.

expireTime string | number | google.protobuf.Timestamp | external:PreciseDate

The expire time of the backup.

gaxOptions CallOptions <optional>

The request configuration options outlined here: https://googleapis.github.io/gax-nodejs/classes/CallSettings.html.

CreateBackupResponse :array

Properties:
Name Type Description
0 Backup

The new Backup.

1 Operation

An Operation object that can be used to check the status of the request.

2 object

The full API response.

CreateDatabaseCallback(errnullable, database, operation, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

database Database

The new Database.

operation Operation

An Operation object that can be used to check the status of the request.

apiResponse object

The full API response.

CreateDatabaseRequest :object

Config for the new database.

Properties:
Name Type Attributes Description
poolOptions SessionPoolOptions <optional>
poolCtor SessionPoolCtor <optional>

CreateDatabaseResponse :array

Properties:
Name Type Description
0 Database

The new Database.

1 Operation

An Operation object that can be used to check the status of the request.

2 object

The full API response.

CreateInstanceCallback(errnullable, instance, operation, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

instance Instance

The new Instance.

operation Operation

An operation object that can be used to check the status of the request.

apiResponse IOperation

The full API response.

CreateInstanceRequest :object

Config for the new instance.

Properties:
Name Type Attributes Default Description
config string

The name of the instance's configuration.

nodes number <optional>
1

The number of nodes allocated to this instance. Defaults to 1.

labels Object.<string, string> <optional>

Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.).

displayName string <optional>

The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. Defaults to the instance unique identifier '' of the full instance name of the form 'projects//instances/'.

CreateInstanceResponse :array

Properties:
Name Type Description
0 Instance

The new Instance.

1 Operation

An operation object that can be used to check the status of the request.

2 IOperation

The full API response.

CreateQueryPartitionsCallback(errnullable, partitions, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

partitions Array.<QueryPartition>

List of query partitions.

apiResponse object

The full API response.

CreateQueryPartitionsResponse :array

Properties:
Name Type Description
0 Array.<QueryPartition>

List of query partitions.

1 object

The full API response.

CreateReadPartitionsCallback(errnullable, partitions, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

partitions Array.<ReadPartition>

List of read partitions.

apiResponse object

The full API response.

CreateReadPartitionsResponse :array

Properties:
Name Type Description
0 Array.<ReadPartition>

List of read partitions.

1 object

The full API response.

CreateSessionCallback(errnullable, session, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

session Session

The newly created session.

apiResponse object

The full API response.

CreateSessionCallback(errnullable, session, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

session Session

The Session.

apiResponse object

The full API response.

CreateSessionOptions :object

Create a new session.

Properties:
Name Type Attributes Description
labels Object.<string, string> <optional>

The labels for the session.

  • Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])?.
  • Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?.
  • No more than 64 labels can be associated with a given session.
gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

CreateSessionResponse :array

Properties:
Name Type Description
0 Session

The newly created session.

1 object

The full API response.

CreateTableCallback(errnullable, table, operation, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

table Table

The new Table.

operation Operation

An Operation object that can be used to check the status of the request.

apiResponse object

The full API response.

CreateTableResponse :array

Properties:
Name Type Description
0 Table

The new Table.

1 Operation

An Operation object that can be used to check the status of the request.

2 object

The full API response.

CreateTransactionCallback(errnullable, transaction, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

transaction BatchTransaction

The BatchTransaction.

apiResponse object

The full API response.

CreateTransactionResponse :array

Properties:
Name Type Description
0 BatchTransaction

The BatchTransaction.

1 object

The full API response.

DatabaseExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Whether the Database exists.

DatabaseExistsResponse :array

Properties:
Name Type Description
0 boolean

Whether the Database exists.

DatabaseRunRequest :object

Transaction options.

Properties:
Name Type Attributes Description
exactStaleness number <optional>

Executes all reads at the timestamp that is exactStaleness old.

readTimestamp date <optional>

Execute all reads at the given timestamp.

strong boolean <optional>

Read at the timestamp where all previously committed transactions are visible.

DeleteInstanceCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteInstanceResponse :array

Properties:
Name Type Description
0 object

The full API response.

ExecuteSqlRequest :object

ExecuteSql request options. This includes all standard ExecuteSqlRequest options as well as several convenience properties.

Properties:
Name Type Attributes Default Description
sql string

The SQL string.

params Object.<string, *> <optional>

A map of parameter names to values.

types Object.<string, (string|ParamType)> <optional>

A map of parameter names to types. If omitted the client will attempt to guess for all non-null values.

json boolean <optional>
false

Receive the rows as serialized objects. This is the equivalent of calling toJSON() on each row.

jsonOptions JSONOptions <optional>

Configuration options for the serialized objects.

See:

Float

See:

GetBackupOperationsCallback(errnullable, 0, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

0 Array.<IOperation>

Array of IOperation instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetBackupOperationsOptions :object

Query object for listing backup operations.

Properties:
Name Type Attributes Description
filter string <optional>

An expression for filtering the results of the request. Filter can be configured as outlined in v1.DatabaseAdminClient#listBackupOperations.

pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

GetBackupOperationsResponse :array

Properties:
Name Type Description
0 Array.<IOperation>

Array of IOperation instances.

1 object

A query object to receive more results.

2 object

The full API response.

GetBackupsCallback(errnullable, 0, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

0 Array.<Backup>

Array of Backup instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetBackupsOptions :object

Query object for listing backups.

Properties:
Name Type Attributes Description
filter string <optional>

An expression for filtering the results of the request. Filter can be configured as outlined in v1.DatabaseAdminClient#listBackups.

pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

GetBackupsResponse :array

Properties:
Name Type Description
0 Array.<Backup>

Array of Backup instances.

1 object

A query object to receive more results.

2 object

The full API response.

GetDatabaseCallback(errnullable, database, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

database Database

The Database.

apiResponse object

The full API response.

GetDatabaseMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The Database metadata.

apiResponse object

The full API response.

GetDatabaseMetadataResponse :array

Properties:
Name Type Description
0 object

The Database metadata.

1 object

The full API response.

GetDatabaseOperationsCallback(errnullable, 0, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

0 Array.<IOperation>

Array of IOperation instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetDatabaseOperationsOptions :object

Query object for listing database operations.

Properties:
Name Type Attributes Description
filter string <optional>

An expression for filtering the results of the request. Filter can be configured as outlined in v1.DatabaseAdminClient#listDatabaseOperations.

pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

GetDatabaseOperationsOptions :object

Query object for listing database operations.

Properties:
Name Type Attributes Description
filter string <optional>

An expression for filtering the results of the request. Filter can be configured as outlined in v1.DatabaseAdminClient#listDatabaseOperations.

pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

GetDatabaseOperationsResponse :array

Properties:
Name Type Description
0 Array.<IOperation>

Array of IOperation instances.

1 object

A query object to receive more results.

2 object

The full API response.

GetDatabaseOperationsResponse :array

Properties:
Name Type Description
0 Array.<IOperation>

Array of IOperation instances.

1 object

The full API response.

GetDatabaseResponse :array

Properties:
Name Type Description
0 Database

The Database.

1 object

The full API response.

GetDatabasesCallback(errnullable, databases, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

databases Array.<Database>

Array of Database instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetDatabasesRequest :object

Query object for listing databases.

Properties:
Name Type Attributes Description
pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

GetDatabasesResponse :array

Properties:
Name Type Description
0 Array.<Database>

Array of Database instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetInstanceCallback(errnullable, instance, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

instance Instance

The Instance.

apiResponse object

The full API response.

GetInstanceConfigsCallback(errnullable, instanceConfigs, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

instanceConfigs Array.<object>

List of all available instance configs.

Properties
Name Type Description
name string

The unique identifier for the instance config.

displayName string

The name of the instance config as it appears in UIs.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetInstanceConfigsOptions :object

Lists the supported instance configurations for a given project.

Properties:
Name Type Attributes Description
pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

GetInstanceConfigsResponse :array

Properties:
Name Type Description
0 Array.<object>

List of all available instance configs.

Properties
Name Type Description
name string

The unique identifier for the instance config.

displayName string

The name of the instance config as it appears in UIs.

1 object

A query object to receive more results.

2 object

The full API response.

GetInstanceMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The Instance metadata.

apiResponse object

The full API response.

GetInstanceMetadataResponse :array

Properties:
Name Type Description
0 object

The Instance metadata.

1 object

The full API response.

GetInstanceResponse :array

Properties:
Name Type Description
0 Instance

The Instance.

1 object

The full API response.

GetInstancesCallback(errnullable, instances, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

instances Array.<Instance>

Array of Instance instances.

nextQuery string

A query object to receive more results.

apiResponse object

The full API response.

GetInstancesOptions :object

Query object for listing instances.

Properties:
Name Type Attributes Description
gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

filter string <optional>

An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: - name - display_name - labels.key where key is the name of a label

Some examples of using filters are:
- **`name:*`** The instance has a name.
- **`name:Howl`** The instance's name is howl.
- **`labels.env:*`** The instance has the label env.
- **`labels.env:dev`** The instance's label env has the value dev.
- **`name:howl labels.env:dev`** The instance's name is howl and it has
  the label env with value dev.
pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

GetInstancesResponse :array

Properties:
Name Type Description
0 Array.<Instance>

Array of Instance instances.

1 object

A query object to receive more results.

2 object

The full API response.

GetMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The Backup metadata.

apiResponse object

The full API response.

GetMetadataResponse :array

Properties:
Name Type Description
0 object

The Backup metadata.

1 object

The full API response.

GetSchemaCallback(errnullable, statements, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

statements Array.<string>

An array of database DDL statements.

apiResponse object

The full API response.

GetSchemaResponse :array

Properties:
Name Type Description
0 Array.<string>

An array of database DDL statements.

1 object

The full API response.

GetSessionMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The session's metadata.

apiResponse object

The full API response.

GetSessionMetadataResponse :array

Properties:
Name Type Description
0 object

The session's metadata.

1 object

The full API response.

GetSessionResponse :array

Properties:
Name Type Description
0 Session

The Session.

1 object

The full API response.

GetSessionsCallback(errnullable, instances, nextQuery, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

instances Array.<Session>

Array of Session instances.

nextQuery object

A query object to receive more results.

apiResponse object

The full API response.

GetSessionsOptions :object

Options object for listing sessions.

Properties:
Name Type Attributes Description
filter string <optional>

An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: - name - display_name - labels.key where key is the name of a label

Some examples of using filters are:
- **`name:*`** The instance has a name.
- **`name:Howl`** The instance's name is howl.
- **`labels.env:*`** The instance has the label env.
- **`labels.env:dev`** The instance's label env has the value dev.
- **`name:howl labels.env:dev`** The instance's name is howl and it has
  the label env with value dev.
pageSize number <optional>

Maximum number of results per page.

pageToken string <optional>

A previously-returned page token representing part of the larger set of results to view.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

GetSessionsResponse :array

Properties:
Name Type Description
0 Array.<Session>

Array of Session instances.

1 object

A query object to receive more results.

2 object

The full API response.

GetSnapshotCallback(errnullable, snapshot)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

snapshot Snapshot

The snapshot object.

GetSnapshotResponse :array

Properties:
Name Type Description
0 Snapshot

The snapshot object.

GetTransactionCallback(errnullable, transaction)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

transaction Transaction

The transaction object.

GetTransactionResponse :array

Properties:
Name Type Description
0 Transaction

The transaction object.

InstanceExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Whether the Instance exists.

InstanceExistsResponse :array

Properties:
Name Type Description
0 boolean

Whether the Instance exists.

Int

See:

IRestoreInfoTranslatedEnum :object

google.spanner.admin.database.v1#RestoreInfo structure with restore source type enum translated to string form.

JSONOptions

Properties:
Name Type Attributes Default Description
wrapNumbers boolean <optional>
false

Indicates if the numbers should be wrapped in Int/Float wrappers.

wrapStructs boolean <optional>
false

Indicates if the structs should be wrapped in Struct wrapper.

KeyRange :object

A KeyRange represents a range of rows in a table or index.

A range has a start key and an end key. These keys can be open or closed, indicating if the range includes rows with that key.

Keys are represented by an array of strings where the nth value in the list corresponds to the nth component of the table or index primary key.

Properties:
Name Type Attributes Description
startClosed Array.<string> <optional>

If the start is closed, then the range includes all rows whose first key columns exactly match.

startOpen Array.<string> <optional>

If the start is open, then the range excludes rows whose first key columns exactly match.

endClosed Array.<string> <optional>

If the end is closed, then the range includes all rows whose first key columns exactly match.

endOpen Array.<string> <optional>

If the end is open, then the range excludes rows whose first key columns exactly match.

Numeric

See:

ParamType :object

Properties:
Name Type Attributes Description
type string

The param type. Must be one of the following: - float64 - int64 - numeric - bool - string - bytes - timestamp - date - struct - array

fields Array.<StructField> <optional>

For struct types only. Type definitions for the individual fields.

child string | ParamType <optional>

For array types only. The array element type.

QueryPartition :object

Properties:
Name Type Description
partitionToken string

The partition token.

See:

ReadPartition :object

Properties:
Name Type Attributes Description
partitionToken string

The partition token.

gaxOptions object <optional>

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html.

Mixes In:
  • ReadRequestOptions

ReadRequest :object

Read request options. This includes all standard ReadRequest options as well as several convenience properties.

Properties:
Name Type Attributes Default Description
keys Array.<string> | Array.<Array.<string>> <optional>

The primary keys of the rows in this table to be yielded. If using a composite key, provide an array within this array. See the example below.

ranges Array.<KeyRange> <optional>

An alternative to the keys property; this can be used to define a range of keys to be yielded.

json boolean <optional>
false

Receive the rows as serialized objects. This is the equivalent of calling toJSON() on each row.

jsonOptions JSONOptions <optional>

Configuration options for the serialized objects.

See:

RestoreDatabaseCallback(errnullable, database, operation, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

database Database

The new Database.

operation Operation

An Operation object that can be used to check the status of the request.

apiResponse object

The full API response.

RestoreDatabaseResponse :array

Properties:
Name Type Description
0 Database

The new Database.

1 Operation

An Operation object that can be used to check the status of the request.

2 object

The full API response.

RunCallback(errnullable, rows, statsnullable)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

rows Array.<(Row|Json)>

Rows are returned as an array of objects. Each object has a name and value property. To get a serialized object, call toJSON().

stats ResultSetStats <nullable>

Query statistics, if the query is executed in PLAN or PROFILE mode.

RunResponse :array

Properties:
Name Type Attributes Description
0 Array.<(Row|Json)>

Rows are returned as an array objects. Each object has a name and value property. To get a serialized object, call toJSON().

1 ResultSetStats <nullable>

Query statistics, if the query is executed in PLAN or PROFILE mode.

RunUpdateCallback(errnullable, rowCount)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

rowCount number

Affected row count.

RunUpdateResponse :array

Properties:
Name Type Description
0 number

Affected row count.

SessionExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Whether the Session exists.

SessionExistsResponse :array

Properties:
Name Type Description
0 boolean

Whether the Session exists.

Struct

See:

StructField :ParamType

Properties:
Name Type Description
name string

The name of the field.

TableReadCallback(errnullable, rows)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

rows Array.<array>

Rows are returned as an array of object arrays. Each object has a name and value property. To get a serialized object, call toJSON(). Optionally, provide an options object to toJSON() specifying wrapNumbers: true to protect large integer values outside of the range of JavaScript Number. If set, FLOAT64 values will be returned as Spanner.Float objects and INT64 values as Spanner.Int.

TableReadRequestOptions :object

Configuration object, describing what to read from the table.

Properties:
Name Type Attributes Default Description
columns Array.<string>

The columns of the table to be returned for each row matching this query.

keys Array.<string> | Array.<Array.<string>>

The primary keys of the rows in this table to be yielded. If using a composite key, provide an array within this array. See the example below.

index string <optional>

The name of an index on the table.

json boolean <optional>
false

Receive the rows as serialized objects. This is the equivalent of calling toJSON() on each row.

jsonOptions object <optional>

Configuration options for the serialized objects.

Properties
Name Type Attributes Default Description
wrapNumbers boolean <optional>
false

Protect large integer values outside of the range of JavaScript Number.

keySet object <optional>

Defines a collection of keys and/or key ranges to read.

limit number <optional>

The number of rows to yield.

TableReadResponse :array

Properties:
Name Type Description
1 Array.<array>

Rows are returned as an array of object arrays. Each object has a name and value property. To get a serialized object, call toJSON(). Optionally, provide an options object to toJSON() specifying wrapNumbers: true to protect large integer values outside of the range of JavaScript Number. If set, FLOAT64 values will be returned as Spanner.Float objects and INT64 values as Spanner.Int.

TimestampBounds :object

Properties:
Name Type Attributes Default Description
strong boolean <optional>
true

Read at a timestamp where all previously committed transactions are visible.

minReadTimestamp external:PreciseDate | google.protobuf.Timestamp <optional>

Executes all reads at a timestamp >= minReadTimestamp.

maxStaleness number | google.protobuf.Timestamp <optional>

Read data at a timestamp >= NOW - maxStaleness (milliseconds).

readTimestamp external:PreciseDate | google.protobuf.Timestamp <optional>

Executes all reads at the given timestamp.

exactStaleness number | google.protobuf.Timestamp <optional>

Executes all reads at a timestamp that is exactStaleness (milliseconds) old.

returnReadTimestamp boolean <optional>
true

When true, Snapshot#readTimestamp will be populated after Snapshot#begin is called.

TransactionBeginCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse TransactionResponse

The raw transaction object.

TransactionBeginResponse :array

Properties:
Name Type Description
0 TransactionResponse

The raw transaction object.

TransactionIdentifier :object

Properties:
Name Type Description
session string

The full session name.

transaction string

The transaction ID.

readTimestamp string | Date

The transaction read timestamp.

TransactionReadCallback(errnullable, rows)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

rows Array.<array>

Rows are returned as an array of object arrays. Each object has a name and value property. To get a serialized object, call toJSON(). Optionally, provide an options object to toJSON() specifying wrapNumbers: true to protect large integer values outside of the range of JavaScript Number. If set, FLOAT64 values are returned as Spanner.Float objects and INT64 values as Spanner.Int.

TransactionReadResponse :array

Properties:
Name Type Description
0 Array.<array>

Rows are returned as an array of object arrays. Each object has a name and value property. To get a serialized object, call toJSON(). Optionally, provide an options object to toJSON() specifying wrapNumbers: true to protect large integer values outside of the range of JavaScript Number. If set, FLOAT64 values are returned as Spanner.Float objects and INT64 values as Spanner.Int.

TransactionResponse :object

Properties:
Name Type Attributes Description
id string | Buffer

The transaction ID.

readTimestamp google.protobuf.Timestamp <nullable>

For snapshot read-only transactions, the read timestamp chosen for the transaction.

UpdateExpireTimeCallback(errnullable, backup)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

backup google.spanner.admin.database.v1.IBackup

The updated backup.