Class protos.google.spanner.v1.Spanner

Represents a Spanner

Inheritance

$protobuf.rpc.Service > protos.google.spanner.v1.Spanner

Package

@google-cloud/spanner!

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new Spanner service.

Parameters
TypeNameDescription
$protobuf.RPCImplrpcImpl

RPC implementation

booleanrequestDelimited

Whether requests are length-delimited

booleanresponseDelimited

Whether responses are length-delimited

Methods

batchCreateSessions(request, callback)

public batchCreateSessions(request: google.spanner.v1.IBatchCreateSessionsRequest, callback: google.spanner.v1.Spanner.BatchCreateSessionsCallback): void;

Calls BatchCreateSessions.

Parameters
TypeNameDescription
IBatchCreateSessionsRequestrequest

BatchCreateSessionsRequest message or plain object

google.spanner.v1.Spanner.BatchCreateSessionsCallbackcallback

Node-style callback called with the error, if any, and BatchCreateSessionsResponse

Returns
TypeDescription
void

batchCreateSessions(request)

public batchCreateSessions(request: google.spanner.v1.IBatchCreateSessionsRequest): Promise<google.spanner.v1.BatchCreateSessionsResponse>;

Calls BatchCreateSessions.

Parameter
TypeNameDescription
IBatchCreateSessionsRequestrequest

BatchCreateSessionsRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.BatchCreateSessionsResponse>

Promise

beginTransaction(request, callback)

public beginTransaction(request: google.spanner.v1.IBeginTransactionRequest, callback: google.spanner.v1.Spanner.BeginTransactionCallback): void;

Calls BeginTransaction.

Parameters
TypeNameDescription
IBeginTransactionRequestrequest

BeginTransactionRequest message or plain object

google.spanner.v1.Spanner.BeginTransactionCallbackcallback

Node-style callback called with the error, if any, and Transaction

Returns
TypeDescription
void

beginTransaction(request)

public beginTransaction(request: google.spanner.v1.IBeginTransactionRequest): Promise<google.spanner.v1.Transaction>;

Calls BeginTransaction.

Parameter
TypeNameDescription
IBeginTransactionRequestrequest

BeginTransactionRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.Transaction>

Promise

commit(request, callback)

public commit(request: google.spanner.v1.ICommitRequest, callback: google.spanner.v1.Spanner.CommitCallback): void;

Calls Commit.

Parameters
TypeNameDescription
ICommitRequestrequest

CommitRequest message or plain object

google.spanner.v1.Spanner.CommitCallbackcallback

Node-style callback called with the error, if any, and CommitResponse

Returns
TypeDescription
void

commit(request)

public commit(request: google.spanner.v1.ICommitRequest): Promise<google.spanner.v1.CommitResponse>;

Calls Commit.

Parameter
TypeNameDescription
ICommitRequestrequest

CommitRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.CommitResponse>

Promise

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Spanner;

Creates new Spanner service using the specified rpc implementation.

Parameters
TypeNameDescription
$protobuf.RPCImplrpcImpl

RPC implementation

booleanrequestDelimited

Whether requests are length-delimited

booleanresponseDelimited

Whether responses are length-delimited

Returns
TypeDescription
Spanner

RPC service. Useful where requests and/or responses are streamed.

createSession(request, callback)

public createSession(request: google.spanner.v1.ICreateSessionRequest, callback: google.spanner.v1.Spanner.CreateSessionCallback): void;

Calls CreateSession.

Parameters
TypeNameDescription
ICreateSessionRequestrequest

CreateSessionRequest message or plain object

google.spanner.v1.Spanner.CreateSessionCallbackcallback

Node-style callback called with the error, if any, and Session

Returns
TypeDescription
void

createSession(request)

public createSession(request: google.spanner.v1.ICreateSessionRequest): Promise<google.spanner.v1.Session>;

Calls CreateSession.

Parameter
TypeNameDescription
ICreateSessionRequestrequest

CreateSessionRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.Session>

Promise

deleteSession(request, callback)

public deleteSession(request: google.spanner.v1.IDeleteSessionRequest, callback: google.spanner.v1.Spanner.DeleteSessionCallback): void;

Calls DeleteSession.

Parameters
TypeNameDescription
IDeleteSessionRequestrequest

DeleteSessionRequest message or plain object

google.spanner.v1.Spanner.DeleteSessionCallbackcallback

Node-style callback called with the error, if any, and Empty

Returns
TypeDescription
void

deleteSession(request)

public deleteSession(request: google.spanner.v1.IDeleteSessionRequest): Promise<google.protobuf.Empty>;

Calls DeleteSession.

Parameter
TypeNameDescription
IDeleteSessionRequestrequest

DeleteSessionRequest message or plain object

Returns
TypeDescription
Promise<google.protobuf.Empty>

Promise

executeBatchDml(request, callback)

public executeBatchDml(request: google.spanner.v1.IExecuteBatchDmlRequest, callback: google.spanner.v1.Spanner.ExecuteBatchDmlCallback): void;

Calls ExecuteBatchDml.

Parameters
TypeNameDescription
IExecuteBatchDmlRequestrequest

ExecuteBatchDmlRequest message or plain object

google.spanner.v1.Spanner.ExecuteBatchDmlCallbackcallback

Node-style callback called with the error, if any, and ExecuteBatchDmlResponse

Returns
TypeDescription
void

executeBatchDml(request)

public executeBatchDml(request: google.spanner.v1.IExecuteBatchDmlRequest): Promise<google.spanner.v1.ExecuteBatchDmlResponse>;

Calls ExecuteBatchDml.

Parameter
TypeNameDescription
IExecuteBatchDmlRequestrequest

ExecuteBatchDmlRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.ExecuteBatchDmlResponse>

Promise

executeSql(request, callback)

public executeSql(request: google.spanner.v1.IExecuteSqlRequest, callback: google.spanner.v1.Spanner.ExecuteSqlCallback): void;

Calls ExecuteSql.

Parameters
TypeNameDescription
IExecuteSqlRequestrequest

ExecuteSqlRequest message or plain object

google.spanner.v1.Spanner.ExecuteSqlCallbackcallback

Node-style callback called with the error, if any, and ResultSet

Returns
TypeDescription
void

executeSql(request)

public executeSql(request: google.spanner.v1.IExecuteSqlRequest): Promise<google.spanner.v1.ResultSet>;

Calls ExecuteSql.

Parameter
TypeNameDescription
IExecuteSqlRequestrequest

ExecuteSqlRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.ResultSet>

Promise

executeStreamingSql(request, callback)

public executeStreamingSql(request: google.spanner.v1.IExecuteSqlRequest, callback: google.spanner.v1.Spanner.ExecuteStreamingSqlCallback): void;

Calls ExecuteStreamingSql.

Parameters
TypeNameDescription
IExecuteSqlRequestrequest

ExecuteSqlRequest message or plain object

google.spanner.v1.Spanner.ExecuteStreamingSqlCallbackcallback

Node-style callback called with the error, if any, and PartialResultSet

Returns
TypeDescription
void

executeStreamingSql(request)

public executeStreamingSql(request: google.spanner.v1.IExecuteSqlRequest): Promise<google.spanner.v1.PartialResultSet>;

Calls ExecuteStreamingSql.

Parameter
TypeNameDescription
IExecuteSqlRequestrequest

ExecuteSqlRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.PartialResultSet>

Promise

getSession(request, callback)

public getSession(request: google.spanner.v1.IGetSessionRequest, callback: google.spanner.v1.Spanner.GetSessionCallback): void;

Calls GetSession.

Parameters
TypeNameDescription
IGetSessionRequestrequest

GetSessionRequest message or plain object

google.spanner.v1.Spanner.GetSessionCallbackcallback

Node-style callback called with the error, if any, and Session

Returns
TypeDescription
void

getSession(request)

public getSession(request: google.spanner.v1.IGetSessionRequest): Promise<google.spanner.v1.Session>;

Calls GetSession.

Parameter
TypeNameDescription
IGetSessionRequestrequest

GetSessionRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.Session>

Promise

listSessions(request, callback)

public listSessions(request: google.spanner.v1.IListSessionsRequest, callback: google.spanner.v1.Spanner.ListSessionsCallback): void;

Calls ListSessions.

Parameters
TypeNameDescription
IListSessionsRequestrequest

ListSessionsRequest message or plain object

google.spanner.v1.Spanner.ListSessionsCallbackcallback

Node-style callback called with the error, if any, and ListSessionsResponse

Returns
TypeDescription
void

listSessions(request)

public listSessions(request: google.spanner.v1.IListSessionsRequest): Promise<google.spanner.v1.ListSessionsResponse>;

Calls ListSessions.

Parameter
TypeNameDescription
IListSessionsRequestrequest

ListSessionsRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.ListSessionsResponse>

Promise

partitionQuery(request, callback)

public partitionQuery(request: google.spanner.v1.IPartitionQueryRequest, callback: google.spanner.v1.Spanner.PartitionQueryCallback): void;

Calls PartitionQuery.

Parameters
TypeNameDescription
IPartitionQueryRequestrequest

PartitionQueryRequest message or plain object

google.spanner.v1.Spanner.PartitionQueryCallbackcallback

Node-style callback called with the error, if any, and PartitionResponse

Returns
TypeDescription
void

partitionQuery(request)

public partitionQuery(request: google.spanner.v1.IPartitionQueryRequest): Promise<google.spanner.v1.PartitionResponse>;

Calls PartitionQuery.

Parameter
TypeNameDescription
IPartitionQueryRequestrequest

PartitionQueryRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.PartitionResponse>

Promise

partitionRead(request, callback)

public partitionRead(request: google.spanner.v1.IPartitionReadRequest, callback: google.spanner.v1.Spanner.PartitionReadCallback): void;

Calls PartitionRead.

Parameters
TypeNameDescription
IPartitionReadRequestrequest

PartitionReadRequest message or plain object

google.spanner.v1.Spanner.PartitionReadCallbackcallback

Node-style callback called with the error, if any, and PartitionResponse

Returns
TypeDescription
void

partitionRead(request)

public partitionRead(request: google.spanner.v1.IPartitionReadRequest): Promise<google.spanner.v1.PartitionResponse>;

Calls PartitionRead.

Parameter
TypeNameDescription
IPartitionReadRequestrequest

PartitionReadRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.PartitionResponse>

Promise

read(request, callback)

public read(request: google.spanner.v1.IReadRequest, callback: google.spanner.v1.Spanner.ReadCallback): void;

Calls Read.

Parameters
TypeNameDescription
IReadRequestrequest

ReadRequest message or plain object

google.spanner.v1.Spanner.ReadCallbackcallback

Node-style callback called with the error, if any, and ResultSet

Returns
TypeDescription
void

read(request)

public read(request: google.spanner.v1.IReadRequest): Promise<google.spanner.v1.ResultSet>;

Calls Read.

Parameter
TypeNameDescription
IReadRequestrequest

ReadRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.ResultSet>

Promise

rollback(request, callback)

public rollback(request: google.spanner.v1.IRollbackRequest, callback: google.spanner.v1.Spanner.RollbackCallback): void;

Calls Rollback.

Parameters
TypeNameDescription
IRollbackRequestrequest

RollbackRequest message or plain object

spannerClient.spanner.v1.Spanner.RollbackCallbackcallback

Node-style callback called with the error, if any, and Empty

Returns
TypeDescription
void

rollback(request)

public rollback(request: google.spanner.v1.IRollbackRequest): Promise<google.protobuf.Empty>;

Calls Rollback.

Parameter
TypeNameDescription
IRollbackRequestrequest

RollbackRequest message or plain object

Returns
TypeDescription
Promise<google.protobuf.Empty>

Promise

streamingRead(request, callback)

public streamingRead(request: google.spanner.v1.IReadRequest, callback: google.spanner.v1.Spanner.StreamingReadCallback): void;

Calls StreamingRead.

Parameters
TypeNameDescription
IReadRequestrequest

ReadRequest message or plain object

google.spanner.v1.Spanner.StreamingReadCallbackcallback

Node-style callback called with the error, if any, and PartialResultSet

Returns
TypeDescription
void

streamingRead(request)

public streamingRead(request: google.spanner.v1.IReadRequest): Promise<google.spanner.v1.PartialResultSet>;

Calls StreamingRead.

Parameter
TypeNameDescription
IReadRequestrequest

ReadRequest message or plain object

Returns
TypeDescription
Promise<google.spanner.v1.PartialResultSet>

Promise