Class protos.google.spanner.v1.Spanner (7.5.0)

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
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

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
NameDescription
request IBatchCreateSessionsRequest

BatchCreateSessionsRequest message or plain object

callback BatchCreateSessionsCallback

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
NameDescription
request IBatchCreateSessionsRequest

BatchCreateSessionsRequest message or plain object

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

Promise

batchWrite(request, callback)

public batchWrite(request: google.spanner.v1.IBatchWriteRequest, callback: google.spanner.v1.Spanner.BatchWriteCallback): void;

Calls BatchWrite.

Parameters
NameDescription
request IBatchWriteRequest

BatchWriteRequest message or plain object

callback BatchWriteCallback

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

Returns
TypeDescription
void

batchWrite(request)

public batchWrite(request: google.spanner.v1.IBatchWriteRequest): Promise<google.spanner.v1.BatchWriteResponse>;

Calls BatchWrite.

Parameter
NameDescription
request IBatchWriteRequest

BatchWriteRequest message or plain object

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

Promise

beginTransaction(request, callback)

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

Calls BeginTransaction.

Parameters
NameDescription
request IBeginTransactionRequest

BeginTransactionRequest message or plain object

callback BeginTransactionCallback

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
NameDescription
request IBeginTransactionRequest

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
NameDescription
request ICommitRequest

CommitRequest message or plain object

callback CommitCallback

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
NameDescription
request ICommitRequest

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
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

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
NameDescription
request ICreateSessionRequest

CreateSessionRequest message or plain object

callback CreateSessionCallback

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
NameDescription
request ICreateSessionRequest

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
NameDescription
request IDeleteSessionRequest

DeleteSessionRequest message or plain object

callback DeleteSessionCallback

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
NameDescription
request IDeleteSessionRequest

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
NameDescription
request IExecuteBatchDmlRequest

ExecuteBatchDmlRequest message or plain object

callback ExecuteBatchDmlCallback

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
NameDescription
request IExecuteBatchDmlRequest

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
NameDescription
request IExecuteSqlRequest

ExecuteSqlRequest message or plain object

callback ExecuteSqlCallback

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
NameDescription
request IExecuteSqlRequest

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
NameDescription
request IExecuteSqlRequest

ExecuteSqlRequest message or plain object

callback ExecuteStreamingSqlCallback

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
NameDescription
request IExecuteSqlRequest

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
NameDescription
request IGetSessionRequest

GetSessionRequest message or plain object

callback GetSessionCallback

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
NameDescription
request IGetSessionRequest

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
NameDescription
request IListSessionsRequest

ListSessionsRequest message or plain object

callback ListSessionsCallback

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
NameDescription
request IListSessionsRequest

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
NameDescription
request IPartitionQueryRequest

PartitionQueryRequest message or plain object

callback PartitionQueryCallback

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
NameDescription
request IPartitionQueryRequest

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
NameDescription
request IPartitionReadRequest

PartitionReadRequest message or plain object

callback PartitionReadCallback

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
NameDescription
request IPartitionReadRequest

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
NameDescription
request IReadRequest

ReadRequest message or plain object

callback ReadCallback

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
NameDescription
request IReadRequest

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
NameDescription
request IRollbackRequest

RollbackRequest message or plain object

callback RollbackCallback

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
NameDescription
request IRollbackRequest

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
NameDescription
request IReadRequest

ReadRequest message or plain object

callback StreamingReadCallback

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
NameDescription
request IReadRequest

ReadRequest message or plain object

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

Promise