Class v1.SpannerClient

Cloud Spanner API

The Cloud Spanner API can be used to manage sessions and execute transactions on data stored in Cloud Spanner databases. v1

Package

@google-cloud/spanner!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of SpannerClient.

Parameter
TypeNameDescription
ClientOptionsopts

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

spannerStub

spannerStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
TypeDescription
(code: string, message: string, warnType?: string) => void

Methods

batchCreateSessions(request, options)

batchCreateSessions(request?: protos.google.spanner.v1.IBatchCreateSessionsRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IBatchCreateSessionsRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | undefined, {} | undefined]>

batchCreateSessions(request, options, callback)

batchCreateSessions(request: protos.google.spanner.v1.IBatchCreateSessionsRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IBatchCreateSessionsRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

batchCreateSessions(request, callback)

batchCreateSessions(request: protos.google.spanner.v1.IBatchCreateSessionsRequest, callback: Callback<protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IBatchCreateSessionsRequestrequest
Callback<protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

beginTransaction(request, options)

beginTransaction(request?: protos.google.spanner.v1.IBeginTransactionRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IBeginTransactionRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | undefined, {} | undefined]>

beginTransaction(request, options, callback)

beginTransaction(request: protos.google.spanner.v1.IBeginTransactionRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IBeginTransactionRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

beginTransaction(request, callback)

beginTransaction(request: protos.google.spanner.v1.IBeginTransactionRequest, callback: Callback<protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IBeginTransactionRequestrequest
Callback<protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

commit(request, options)

commit(request?: protos.google.spanner.v1.ICommitRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.ICommitRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | undefined, {} | undefined]>

commit(request, options, callback)

commit(request: protos.google.spanner.v1.ICommitRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.ICommitRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

commit(request, callback)

commit(request: protos.google.spanner.v1.ICommitRequest, callback: Callback<protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.ICommitRequestrequest
Callback<protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

createSession(request, options)

createSession(request?: protos.google.spanner.v1.ICreateSessionRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.ICreateSessionRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | undefined, {} | undefined]>

createSession(request, options, callback)

createSession(request: protos.google.spanner.v1.ICreateSessionRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.ICreateSessionRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

createSession(request, callback)

createSession(request: protos.google.spanner.v1.ICreateSessionRequest, callback: Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.ICreateSessionRequestrequest
Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

databasePath(project, instance, database)

databasePath(project: string, instance: string, database: string): string;

Return a fully-qualified database resource name string.

Parameters
TypeNameDescription
stringproject
stringinstance
stringdatabase
Returns
TypeDescription
string

{string} Resource name string.

deleteSession(request, options)

deleteSession(request?: protos.google.spanner.v1.IDeleteSessionRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IDeleteSessionRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | undefined, {} | undefined]>

deleteSession(request, options, callback)

deleteSession(request: protos.google.spanner.v1.IDeleteSessionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IDeleteSessionRequestrequest
CallOptionsoptions
Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

deleteSession(request, callback)

deleteSession(request: protos.google.spanner.v1.IDeleteSessionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IDeleteSessionRequestrequest
Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

executeBatchDml(request, options)

executeBatchDml(request?: protos.google.spanner.v1.IExecuteBatchDmlRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteBatchDmlRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | undefined, {} | undefined]>

executeBatchDml(request, options, callback)

executeBatchDml(request: protos.google.spanner.v1.IExecuteBatchDmlRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteBatchDmlRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

executeBatchDml(request, callback)

executeBatchDml(request: protos.google.spanner.v1.IExecuteBatchDmlRequest, callback: Callback<protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteBatchDmlRequestrequest
Callback<protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

executeSql(request, options)

executeSql(request?: protos.google.spanner.v1.IExecuteSqlRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteSqlRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | undefined, {} | undefined]>

executeSql(request, options, callback)

executeSql(request: protos.google.spanner.v1.IExecuteSqlRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteSqlRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

executeSql(request, callback)

executeSql(request: protos.google.spanner.v1.IExecuteSqlRequest, callback: Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteSqlRequestrequest
Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

executeStreamingSql(request, options)

executeStreamingSql(request?: protos.google.spanner.v1.IExecuteSqlRequest, options?: CallOptions): gax.CancellableStream;

Like , except returns the result set as a stream. Unlike , there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100 MiB, and no column value can exceed 10 MiB.

Parameters
TypeNameDescription
protos.google.spanner.v1.IExecuteSqlRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
gax.CancellableStream

{Stream} An object stream which emits [PartialResultSet] on 'data' event. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) for more details and examples.

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
TypeNameDescription
Callback<string, undefined, undefined>callback
Returns
TypeDescription
void

getSession(request, options)

getSession(request?: protos.google.spanner.v1.IGetSessionRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IGetSessionRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | undefined, {} | undefined]>

getSession(request, options, callback)

getSession(request: protos.google.spanner.v1.IGetSessionRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IGetSessionRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

getSession(request, callback)

getSession(request: protos.google.spanner.v1.IGetSessionRequest, callback: Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IGetSessionRequestrequest
Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listSessions(request, options)

listSessions(request?: protos.google.spanner.v1.IListSessionsRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.ISession[], protos.google.spanner.v1.IListSessionsRequest | null, protos.google.spanner.v1.IListSessionsResponse]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IListSessionsRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.ISession[], protos.google.spanner.v1.IListSessionsRequest | null, protos.google.spanner.v1.IListSessionsResponse]>

listSessions(request, options, callback)

listSessions(request: protos.google.spanner.v1.IListSessionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.spanner.v1.IListSessionsRequest, protos.google.spanner.v1.IListSessionsResponse | null | undefined, protos.google.spanner.v1.ISession>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IListSessionsRequestrequest
CallOptionsoptions
PaginationCallback<protos.google.spanner.v1.IListSessionsRequest, protos.google.spanner.v1.IListSessionsResponse | null | undefined, protos.google.spanner.v1.ISession>callback
Returns
TypeDescription
void

listSessions(request, callback)

listSessions(request: protos.google.spanner.v1.IListSessionsRequest, callback: PaginationCallback<protos.google.spanner.v1.IListSessionsRequest, protos.google.spanner.v1.IListSessionsResponse | null | undefined, protos.google.spanner.v1.ISession>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IListSessionsRequestrequest
PaginationCallback<protos.google.spanner.v1.IListSessionsRequest, protos.google.spanner.v1.IListSessionsResponse | null | undefined, protos.google.spanner.v1.ISession>callback
Returns
TypeDescription
void

listSessionsAsync(request, options)

listSessionsAsync(request?: protos.google.spanner.v1.IListSessionsRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.v1.ISession>;

Equivalent to listSessions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
TypeNameDescription
protos.google.spanner.v1.IListSessionsRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.spanner.v1.ISession>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Session]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSessionsStream(request, options)

listSessionsStream(request?: protos.google.spanner.v1.IListSessionsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
TypeNameDescription
protos.google.spanner.v1.IListSessionsRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Session] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSessionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchDatabaseFromDatabaseName(databaseName)

matchDatabaseFromDatabaseName(databaseName: string): string | number;

Parse the database from Database resource.

Parameter
TypeNameDescription
stringdatabaseName

A fully-qualified path representing Database resource.

Returns
TypeDescription
string | number

{string} A string representing the database.

matchDatabaseFromSessionName(sessionName)

matchDatabaseFromSessionName(sessionName: string): string | number;

Parse the database from Session resource.

Parameter
TypeNameDescription
stringsessionName

A fully-qualified path representing Session resource.

Returns
TypeDescription
string | number

{string} A string representing the database.

matchInstanceFromDatabaseName(databaseName)

matchInstanceFromDatabaseName(databaseName: string): string | number;

Parse the instance from Database resource.

Parameter
TypeNameDescription
stringdatabaseName

A fully-qualified path representing Database resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromSessionName(sessionName)

matchInstanceFromSessionName(sessionName: string): string | number;

Parse the instance from Session resource.

Parameter
TypeNameDescription
stringsessionName

A fully-qualified path representing Session resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchProjectFromDatabaseName(databaseName)

matchProjectFromDatabaseName(databaseName: string): string | number;

Parse the project from Database resource.

Parameter
TypeNameDescription
stringdatabaseName

A fully-qualified path representing Database resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSessionName(sessionName)

matchProjectFromSessionName(sessionName: string): string | number;

Parse the project from Session resource.

Parameter
TypeNameDescription
stringsessionName

A fully-qualified path representing Session resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchSessionFromSessionName(sessionName)

matchSessionFromSessionName(sessionName: string): string | number;

Parse the session from Session resource.

Parameter
TypeNameDescription
stringsessionName

A fully-qualified path representing Session resource.

Returns
TypeDescription
string | number

{string} A string representing the session.

partitionQuery(request, options)

partitionQuery(request?: protos.google.spanner.v1.IPartitionQueryRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IPartitionQueryRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | undefined, {} | undefined]>

partitionQuery(request, options, callback)

partitionQuery(request: protos.google.spanner.v1.IPartitionQueryRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IPartitionQueryRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

partitionQuery(request, callback)

partitionQuery(request: protos.google.spanner.v1.IPartitionQueryRequest, callback: Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IPartitionQueryRequestrequest
Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

partitionRead(request, options)

partitionRead(request?: protos.google.spanner.v1.IPartitionReadRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IPartitionReadRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | undefined, {} | undefined]>

partitionRead(request, options, callback)

partitionRead(request: protos.google.spanner.v1.IPartitionReadRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IPartitionReadRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

partitionRead(request, callback)

partitionRead(request: protos.google.spanner.v1.IPartitionReadRequest, callback: Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IPartitionReadRequestrequest
Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

read(request, options)

read(request?: protos.google.spanner.v1.IReadRequest, options?: CallOptions): Promise<[protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IReadRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | undefined, {} | undefined]>

read(request, options, callback)

read(request: protos.google.spanner.v1.IReadRequest, options: CallOptions, callback: Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IReadRequestrequest
CallOptionsoptions
Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

read(request, callback)

read(request: protos.google.spanner.v1.IReadRequest, callback: Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IReadRequestrequest
Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

rollback(request, options)

rollback(request?: protos.google.spanner.v1.IRollbackRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | undefined, {} | undefined]>;
Parameters
TypeNameDescription
protos.google.spanner.v1.IRollbackRequestrequest
CallOptionsoptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | undefined, {} | undefined]>

rollback(request, options, callback)

rollback(request: protos.google.spanner.v1.IRollbackRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IRollbackRequestrequest
CallOptionsoptions
Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

rollback(request, callback)

rollback(request: protos.google.spanner.v1.IRollbackRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
Parameters
TypeNameDescription
protos.google.spanner.v1.IRollbackRequestrequest
Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | null | undefined, {} | null | undefined>callback
Returns
TypeDescription
void

sessionPath(project, instance, database, session)

sessionPath(project: string, instance: string, database: string, session: string): string;

Return a fully-qualified session resource name string.

Parameters
TypeNameDescription
stringproject
stringinstance
stringdatabase
stringsession
Returns
TypeDescription
string

{string} Resource name string.

streamingRead(request, options)

streamingRead(request?: protos.google.spanner.v1.IReadRequest, options?: CallOptions): gax.CancellableStream;

Like , except returns the result set as a stream. Unlike , there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100 MiB, and no column value can exceed 10 MiB.

Parameters
TypeNameDescription
protos.google.spanner.v1.IReadRequestrequest

The request object that will be sent.

CallOptionsoptions

Call options. See CallOptions for more details.

Returns
TypeDescription
gax.CancellableStream

{Stream} An object stream which emits [PartialResultSet] on 'data' event. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) for more details and examples.