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| Type | Name | Description |
|---|
| ClientOptions | opts | |
Properties
apiEndpoint
staticgetapiEndpoint():string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Valueauth
Property Value| Type | Description |
|---|
| gax.GoogleAuth | |
descriptors
Property Value| Type | Description |
|---|
| Descriptors | |
innerApiCalls
innerApiCalls:{[name:string]:Function;};
Property Value| Type | Description |
|---|
| { [name: string]:Function; } | |
pathTemplates
pathTemplates:{[name:string]:gax.PathTemplate;};
Property Value| Type | Description |
|---|
| { [name: string]: gax.PathTemplate; } | |
port
The port for this API service.
Property Valuescopes
staticgetscopes():string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property ValueservicePath
staticgetservicePath():string;
The DNS address for this API service.
Property ValuespannerStub
spannerStub?:Promise<{[name:string]:Function;}>;
Property Value| Type | Description |
|---|
| Promise<{ [name: string]:Function; }> | |
warn
warn:(code:string,message:string,warnType?:string)=>void;
Property Value| Type | Description |
|---|
| (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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IBatchCreateSessionsRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IBatchCreateSessionsRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsbatchCreateSessions(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IBatchCreateSessionsRequest | request | |
| Callback<protos.google.spanner.v1.IBatchCreateSessionsResponse, protos.google.spanner.v1.IBatchCreateSessionsRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsbeginTransaction(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IBeginTransactionRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IBeginTransactionRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsbeginTransaction(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IBeginTransactionRequest | request | |
| Callback<protos.google.spanner.v1.ITransaction, protos.google.spanner.v1.IBeginTransactionRequest | null | undefined, {} | null | undefined> | callback | |
Returnsclose()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.ICommitRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.ICommitRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | null | undefined, {} | null | undefined> | callback | |
Returnscommit(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.ICommitRequest | request | |
| Callback<protos.google.spanner.v1.ICommitResponse, protos.google.spanner.v1.ICommitRequest | null | undefined, {} | null | undefined> | callback | |
ReturnscreateSession(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.ICreateSessionRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.ICreateSessionRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | null | undefined, {} | null | undefined> | callback | |
ReturnscreateSession(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.ICreateSessionRequest | request | |
| Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.ICreateSessionRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsdatabasePath(project, instance, database)
databasePath(project:string,instance:string,database:string):string;
Return a fully-qualified database resource name string.
Parameters| Type | Name | Description |
|---|
| string | project | |
| string | instance | |
| string | database | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IDeleteSessionRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IDeleteSessionRequest | request | |
| CallOptions | options | |
| Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsdeleteSession(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IDeleteSessionRequest | request | |
| Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IDeleteSessionRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsexecuteBatchDml(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteBatchDmlRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteBatchDmlRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsexecuteBatchDml(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteBatchDmlRequest | request | |
| Callback<protos.google.spanner.v1.IExecuteBatchDmlResponse, protos.google.spanner.v1.IExecuteBatchDmlRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsexecuteSql(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteSqlRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteSqlRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsexecuteSql(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteSqlRequest | request | |
| Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IExecuteSqlRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsexecuteStreamingSql(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IExecuteSqlRequest | request | The request object that will be sent. |
| CallOptions | options | Call options. SeeCallOptions for more details. |
Returns| Type | Description |
|---|
| 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| Type | Description |
|---|
| Promise<string> | |
getProjectId(callback)
getProjectId(callback:Callback<string,undefined,undefined>):void;
Parameter| Type | Name | Description |
|---|
| Callback<string, undefined, undefined> | callback | |
ReturnsgetSession(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IGetSessionRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IGetSessionRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | null | undefined, {} | null | undefined> | callback | |
ReturnsgetSession(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IGetSessionRequest | request | |
| Callback<protos.google.spanner.v1.ISession, protos.google.spanner.v1.IGetSessionRequest | null | undefined, {} | null | undefined> | callback | |
Returnsinitialize()
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| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IListSessionsRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IListSessionsRequest | request | |
| CallOptions | options | |
| PaginationCallback<protos.google.spanner.v1.IListSessionsRequest, protos.google.spanner.v1.IListSessionsResponse | null | undefined, protos.google.spanner.v1.ISession> | callback | |
ReturnslistSessions(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IListSessionsRequest | request | |
| PaginationCallback<protos.google.spanner.v1.IListSessionsRequest, protos.google.spanner.v1.IListSessionsResponse | null | undefined, protos.google.spanner.v1.ISession> | callback | |
ReturnslistSessionsAsync(request, options)
listSessionsAsync(request?:protos.google.spanner.v1.IListSessionsRequest,options?:CallOptions):AsyncIterable<protos.google.spanner.v1.ISession>;
Equivalent tolistSessions, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
Parameters| Type | Name | Description |
|---|
| protos.google.spanner.v1.IListSessionsRequest | request | The request object that will be sent. |
| CallOptions | options | Call options. SeeCallOptions for more details. |
Returns| Type | Description |
|---|
| 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 tomethod.name.toCamelCase(), but returns a NodeJS Stream object.
Parameters| Type | Name | Description |
|---|
| protos.google.spanner.v1.IListSessionsRequest | request | The request object that will be sent. |
| CallOptions | options | Call options. SeeCallOptions for more details. |
Returns| Type | Description |
|---|
| 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 usinglistSessionsAsync() 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| Type | Name | Description |
|---|
| string | databaseName | A fully-qualified path representing Database resource. |
Returns| Type | Description |
|---|
| string | number | {string} A string representing the database. |
matchDatabaseFromSessionName(sessionName)
matchDatabaseFromSessionName(sessionName:string):string|number;
Parse the database from Session resource.
Parameter| Type | Name | Description |
|---|
| string | sessionName | A fully-qualified path representing Session resource. |
Returns| Type | Description |
|---|
| string | number | {string} A string representing the database. |
matchInstanceFromDatabaseName(databaseName)
matchInstanceFromDatabaseName(databaseName:string):string|number;
Parse the instance from Database resource.
Parameter| Type | Name | Description |
|---|
| string | databaseName | A fully-qualified path representing Database resource. |
Returns| Type | Description |
|---|
| string | number | {string} A string representing the instance. |
matchInstanceFromSessionName(sessionName)
matchInstanceFromSessionName(sessionName:string):string|number;
Parse the instance from Session resource.
Parameter| Type | Name | Description |
|---|
| string | sessionName | A fully-qualified path representing Session resource. |
Returns| Type | Description |
|---|
| string | number | {string} A string representing the instance. |
matchProjectFromDatabaseName(databaseName)
matchProjectFromDatabaseName(databaseName:string):string|number;
Parse the project from Database resource.
Parameter| Type | Name | Description |
|---|
| string | databaseName | A fully-qualified path representing Database resource. |
Returns| Type | Description |
|---|
| string | number | {string} A string representing the project. |
matchProjectFromSessionName(sessionName)
matchProjectFromSessionName(sessionName:string):string|number;
Parse the project from Session resource.
Parameter| Type | Name | Description |
|---|
| string | sessionName | A fully-qualified path representing Session resource. |
Returns| Type | Description |
|---|
| string | number | {string} A string representing the project. |
matchSessionFromSessionName(sessionName)
matchSessionFromSessionName(sessionName:string):string|number;
Parse the session from Session resource.
Parameter| Type | Name | Description |
|---|
| string | sessionName | A fully-qualified path representing Session resource. |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IPartitionQueryRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IPartitionQueryRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | null | undefined, {} | null | undefined> | callback | |
ReturnspartitionQuery(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IPartitionQueryRequest | request | |
| Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionQueryRequest | null | undefined, {} | null | undefined> | callback | |
ReturnspartitionRead(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IPartitionReadRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IPartitionReadRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined> | callback | |
ReturnspartitionRead(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IPartitionReadRequest | request | |
| Callback<protos.google.spanner.v1.IPartitionResponse, protos.google.spanner.v1.IPartitionReadRequest | null | undefined, {} | null | undefined> | callback | |
Returnsread(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IReadRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IReadRequest | request | |
| CallOptions | options | |
| Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined> | callback | |
Returnsread(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IReadRequest | request | |
| Callback<protos.google.spanner.v1.IResultSet, protos.google.spanner.v1.IReadRequest | null | undefined, {} | null | undefined> | callback | |
Returnsrollback(request, options)
rollback(request?:protos.google.spanner.v1.IRollbackRequest,options?:CallOptions):Promise<[protos.google.protobuf.IEmpty,protos.google.spanner.v1.IRollbackRequest|undefined,{}|undefined]>;
Parameters| Type | Name | Description |
|---|
| protos.google.spanner.v1.IRollbackRequest | request | |
| CallOptions | options | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IRollbackRequest | request | |
| CallOptions | options | |
| Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | null | undefined, {} | null | undefined> | callback | |
Returnsrollback(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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IRollbackRequest | request | |
| Callback<protos.google.protobuf.IEmpty, protos.google.spanner.v1.IRollbackRequest | null | undefined, {} | null | undefined> | callback | |
ReturnssessionPath(project, instance, database, session)
sessionPath(project:string,instance:string,database:string,session:string):string;
Return a fully-qualified session resource name string.
Parameters| Type | Name | Description |
|---|
| string | project | |
| string | instance | |
| string | database | |
| string | session | |
Returns| Type | Description |
|---|
| 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| Type | Name | Description |
|---|
| protos.google.spanner.v1.IReadRequest | request | The request object that will be sent. |
| CallOptions | options | Call options. SeeCallOptions for more details. |
Returns| Type | Description |
|---|
| 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. |