Globals

Abstract types

BasicCallback

BasicCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

BasicResponse

array

Property

Parameter

0

object

The full API response.

ClientConfig

object

Properties

Parameter

projectId

Optional

string

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

keyFilename

Optional

string

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.

email

Optional

string

Account email address. Required when using a .pem or .p12 keyFilename.

credentials

Optional

object

Credentials object.

autoRetry

Optional

boolean

Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default.

maxRetries

Optional

number

Maximum number of automatic retries attempted before returning the error.

promise

Optional

Constructor

Custom promise module to use instead of native Promises.

CloseDatabaseCallback

CloseDatabaseCallback(err)

Parameter

err

Error

Request error, if any.

Value may be null.

CreateDatabaseCallback

CreateDatabaseCallback(err, database, operation, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

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.

Property

Parameter

poolOptions

Optional

SessionPoolOptions

CreateDatabaseResponse

array

Properties

Parameter

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

CreateInstanceCallback(err, instance, operation, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

instance

Instance

The new Instance.

operation

Operation

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

apiResponse

object

The full API response.

CreateInstanceRequest

object

Config for the new instance.

Properties

Parameter

config

string

The name of the instance's configuration.

nodes

number

The number of nodes allocated to this instance.

CreateInstanceResponse

array

Properties

Parameter

0

Instance

The new Instance.

1

Operation

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

2

object

The full API response.

CreateSessionCallback

CreateSessionCallback(err, session, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

session

Session

The newly created session.

apiResponse

object

The full API response.

CreateSessionResponse

array

Properties

Parameter

0

Session

The newly created session.

2

object

The full API response.

CreateTableCallback

CreateTableCallback(err, table, operation, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

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

Parameter

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.

DatabaseExistsCallback

DatabaseExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the Database exists.

DatabaseExistsResponse

array

Property

Parameter

0

boolean

Whether the Database exists.

DatabaseRunRequest

object

Transaction options.

Properties

Parameter

exactStaleness

Optional

number

Executes all reads at the timestamp that is exactStaleness old.

readTimestamp

Optional

date

Execute all reads at the given timestamp.

strong

Optional

boolean

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

DeleteInstanceCallback

DeleteInstanceCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

DeleteInstanceResponse

array

Property

Parameter

0

object

The full API response.

GetDatabaseCallback

GetDatabaseCallback(err, database, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

database

Database

The Database.

apiResponse

object

The full API response.

GetDatabaseMetadataCallback

GetDatabaseMetadataCallback(err, metadata, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The Database metadata.

apiResponse

object

The full API response.

GetDatabaseMetadataResponse

array

Properties

Parameter

0

object

The Database metadata.

1

object

The full API response.

GetDatabaseResponse

array

Properties

Parameter

0

Database

The Database.

1

object

The full API response.

GetDatabasesCallback

GetDatabasesCallback(err, databases, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

databases

Array of Database

Array of Database instances.

apiResponse

object

The full API response.

GetDatabasesRequest

object

Query object for listing databases.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

maxApiCalls

Optional

number

Maximum number of API calls to make.

maxResults

Optional

number

Maximum number of items to return.

pageSize

Optional

number

Maximum number of results per page.

pageToken

Optional

string

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

GetDatabasesResponse

array

Properties

Parameter

0

Array of Database

Array of Database instances.

1

object

The full API response.

GetInstanceCallback

GetInstanceCallback(err, instance, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

instance

Instance

The Instance.

apiResponse

object

The full API response.

GetInstanceConfigsCallback

GetInstanceConfigsCallback(err, instanceConfigs, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

instanceConfigs

Array of object

List of all available instance configs.

apiResponse

object

The full API response.

GetInstanceConfigsRequest

object

Query object for listing instance configs.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

maxApiCalls

Optional

number

Maximum number of API calls to make.

maxResults

Optional

number

Maximum number of items to return.

pageSize

Optional

number

Maximum number of results per page.

pageToken

Optional

string

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

GetInstanceConfigsResponse

array

Properties

Parameter

0

Array of object

List of all available instance configs.

1

object

The full API response.

GetInstanceMetadataCallback

GetInstanceMetadataCallback(err, metadata, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The Instance metadata.

apiResponse

object

The full API response.

GetInstanceMetadataResponse

array

Properties

Parameter

0

object

The Instance metadata.

1

object

The full API response.

GetInstanceResponse

array

Properties

Parameter

0

Instance

The Instance.

1

object

The full API response.

GetInstancesCallback

GetInstancesCallback(err, instances, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

instances

Array of Instance

Array of Instance instances.

apiResponse

object

The full API response.

GetInstancesRequest

object

Query object for listing instances.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

filter

Optional

string

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.

maxApiCalls

Optional

number

Maximum number of API calls to make.

maxResults

Optional

number

Maximum number of items to return.

pageSize

Optional

number

Maximum number of results per page.

pageToken

Optional

string

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

GetInstancesResponse

array

Properties

Parameter

0

Array of Instance

Array of Instance instances.

1

object

The full API response.

GetSchemaCallback

GetSchemaCallback(err, statements, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

statements

Array of string

An array of database DDL statements.

apiResponse

object

The full API response.

GetSchemaResponse

array

Properties

Parameter

0

Array of string

An array of database DDL statements.

1

object

The full API response.

GetSessionCallback

GetSessionCallback(err, session, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

session

Session

The Session.

apiResponse

object

The full API response.

GetSessionMetadataCallback

GetSessionMetadataCallback(err, metadata, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The session's metadata.

apiResponse

object

The full API response.

GetSessionMetadataResponse

array

Properties

Parameter

0

object

The session's metadata.

1

object

The full API response.

GetSessionResponse

array

Properties

Parameter

0

Session

The Session.

1

object

The full API response.

GetTransactionCallback

GetTransactionCallback(err, transaction)

Parameter

err

Error

Request error, if any.

Value may be null.

transaction

Transaction

The transaction object.

GetTransactionResponse

array

Property

Parameter

0

Transaction

The transaction object.

InstanceExistsCallback

InstanceExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the Instance exists.

InstanceExistsResponse

array

Property

Parameter

0

boolean

Whether the Instance exists.

LongRunningOperationCallback

LongRunningOperationCallback(err, operation, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

operation

Operation

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

apiResponse

object

The full API response.

LongRunningOperationResponse

array

Properties

Parameter

0

Operation

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

1

object

The full API response.

ReadRequestOptions

object

Read request config.

Properties

Parameter

columns

Array of string

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

keys

array

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

Optional

string

The name of an index on the table.

ReadStreamRequestOptions

object

Read stream request config.

Properties

Parameter

columns

Array of string

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

keys

array

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

Optional

string

The name of an index on the table.

limit

Optional

number

The number of rows to yield.

RunCallback

RunCallback(err, rows)

Parameter

err

Error

Request error, if any.

Value may be null.

rows

Array of array

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

RunResponse

array

Property

Parameter

0

Array of array

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

RunTransactionCallback

RunTransactionCallback(err, transaction)

A function to execute in the context of a transaction.

Parameter

err

Error

An error returned while making this request.

Value may be null.

transaction

Transaction

The transaction object. The transaction has already been created, and is ready to be queried and committed against.

RunTransactionResponse

array

Property

Parameter

0

Transaction

The transaction object. The transaction has already been created, and is ready to be queried and committed against.

SessionExistsCallback

SessionExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the Session exists.

SessionExistsResponse

array

Property

Parameter

0

boolean

Whether the Session exists.

TableReadCallback

TableReadCallback(err, rows)

Parameter

err

Error

Request error, if any.

Value may be null.

rows

Array of 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().

TableReadRequestOptions

object

Configuration object, describing what to read from the table.

Properties

Parameter

columns

Array of string

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

keys

array

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

Optional

string

The name of an index on the table.

keySet

Optional

object

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

limit

Optional

number

The number of rows to yield.

TableReadResponse

array

Properties

Parameter

0

Table

The new Table.

1

Array of 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().

TransactionOptions

object

Read/write transaction options.

Properties

Parameter

timeout

Optional

number

Specify a timeout (in milliseconds) for the transaction. The transaction will be ran in its entirety, however if an abort error is returned the transaction will be retried if the timeout has not been met.

readOnly

Optional

boolean

Specifies if the transaction is read-only.

exactStaleness

Optional

number

Executes all reads at the timestamp that is exactStaleness old. This is only applicable for read-only transactions.

readTimestamp

Optional

date

Execute all reads at the given timestamp. This is only applicable for read-only transactions.

returnTimestamp

Optional

boolean

If true, returns the read timestamp.

strong

Optional

boolean

Read at the timestamp where all previously committed transactions are visible. This is only applicable for read-only transactions.

TransactionRequestReadCallback

TransactionRequestReadCallback(err, rows)

Parameter

err

Error

Request error, if any.

Value may be null.

rows

Array of 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().

TransactionRequestReadResponse

array

Property

Parameter

0

Array of 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().