Represents a Spanner
Inheritance
$protobuf.rpc.Service > protos.google.spanner.v1.SpannerPackage
@google-cloud/spannerConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new Spanner service.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Name | Description |
request |
IBatchCreateSessionsRequest
BatchCreateSessionsRequest message or plain object |
callback |
BatchCreateSessionsCallback
Node-style callback called with the error, if any, and BatchCreateSessionsResponse |
Returns | |
---|---|
Type | Description |
void |
batchCreateSessions(request)
public batchCreateSessions(request: google.spanner.v1.IBatchCreateSessionsRequest): Promise<google.spanner.v1.BatchCreateSessionsResponse>;
Calls BatchCreateSessions.
Parameter | |
---|---|
Name | Description |
request |
IBatchCreateSessionsRequest
BatchCreateSessionsRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IBeginTransactionRequest
BeginTransactionRequest message or plain object |
callback |
BeginTransactionCallback
Node-style callback called with the error, if any, and Transaction |
Returns | |
---|---|
Type | Description |
void |
beginTransaction(request)
public beginTransaction(request: google.spanner.v1.IBeginTransactionRequest): Promise<google.spanner.v1.Transaction>;
Calls BeginTransaction.
Parameter | |
---|---|
Name | Description |
request |
IBeginTransactionRequest
BeginTransactionRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICommitRequest
CommitRequest message or plain object |
callback |
CommitCallback
Node-style callback called with the error, if any, and CommitResponse |
Returns | |
---|---|
Type | Description |
void |
commit(request)
public commit(request: google.spanner.v1.ICommitRequest): Promise<google.spanner.v1.CommitResponse>;
Calls Commit.
Parameter | |
---|---|
Name | Description |
request |
ICommitRequest
CommitRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICreateSessionRequest
CreateSessionRequest message or plain object |
callback |
CreateSessionCallback
Node-style callback called with the error, if any, and Session |
Returns | |
---|---|
Type | Description |
void |
createSession(request)
public createSession(request: google.spanner.v1.ICreateSessionRequest): Promise<google.spanner.v1.Session>;
Calls CreateSession.
Parameter | |
---|---|
Name | Description |
request |
ICreateSessionRequest
CreateSessionRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IDeleteSessionRequest
DeleteSessionRequest message or plain object |
callback |
DeleteSessionCallback
Node-style callback called with the error, if any, and Empty |
Returns | |
---|---|
Type | Description |
void |
deleteSession(request)
public deleteSession(request: google.spanner.v1.IDeleteSessionRequest): Promise<google.protobuf.Empty>;
Calls DeleteSession.
Parameter | |
---|---|
Name | Description |
request |
IDeleteSessionRequest
DeleteSessionRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExecuteBatchDmlRequest
ExecuteBatchDmlRequest message or plain object |
callback |
ExecuteBatchDmlCallback
Node-style callback called with the error, if any, and ExecuteBatchDmlResponse |
Returns | |
---|---|
Type | Description |
void |
executeBatchDml(request)
public executeBatchDml(request: google.spanner.v1.IExecuteBatchDmlRequest): Promise<google.spanner.v1.ExecuteBatchDmlResponse>;
Calls ExecuteBatchDml.
Parameter | |
---|---|
Name | Description |
request |
IExecuteBatchDmlRequest
ExecuteBatchDmlRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExecuteSqlRequest
ExecuteSqlRequest message or plain object |
callback |
ExecuteSqlCallback
Node-style callback called with the error, if any, and ResultSet |
Returns | |
---|---|
Type | Description |
void |
executeSql(request)
public executeSql(request: google.spanner.v1.IExecuteSqlRequest): Promise<google.spanner.v1.ResultSet>;
Calls ExecuteSql.
Parameter | |
---|---|
Name | Description |
request |
IExecuteSqlRequest
ExecuteSqlRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExecuteSqlRequest
ExecuteSqlRequest message or plain object |
callback |
ExecuteStreamingSqlCallback
Node-style callback called with the error, if any, and PartialResultSet |
Returns | |
---|---|
Type | Description |
void |
executeStreamingSql(request)
public executeStreamingSql(request: google.spanner.v1.IExecuteSqlRequest): Promise<google.spanner.v1.PartialResultSet>;
Calls ExecuteStreamingSql.
Parameter | |
---|---|
Name | Description |
request |
IExecuteSqlRequest
ExecuteSqlRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetSessionRequest
GetSessionRequest message or plain object |
callback |
GetSessionCallback
Node-style callback called with the error, if any, and Session |
Returns | |
---|---|
Type | Description |
void |
getSession(request)
public getSession(request: google.spanner.v1.IGetSessionRequest): Promise<google.spanner.v1.Session>;
Calls GetSession.
Parameter | |
---|---|
Name | Description |
request |
IGetSessionRequest
GetSessionRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IListSessionsRequest
ListSessionsRequest message or plain object |
callback |
ListSessionsCallback
Node-style callback called with the error, if any, and ListSessionsResponse |
Returns | |
---|---|
Type | Description |
void |
listSessions(request)
public listSessions(request: google.spanner.v1.IListSessionsRequest): Promise<google.spanner.v1.ListSessionsResponse>;
Calls ListSessions.
Parameter | |
---|---|
Name | Description |
request |
IListSessionsRequest
ListSessionsRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IPartitionQueryRequest
PartitionQueryRequest message or plain object |
callback |
PartitionQueryCallback
Node-style callback called with the error, if any, and PartitionResponse |
Returns | |
---|---|
Type | Description |
void |
partitionQuery(request)
public partitionQuery(request: google.spanner.v1.IPartitionQueryRequest): Promise<google.spanner.v1.PartitionResponse>;
Calls PartitionQuery.
Parameter | |
---|---|
Name | Description |
request |
IPartitionQueryRequest
PartitionQueryRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IPartitionReadRequest
PartitionReadRequest message or plain object |
callback |
PartitionReadCallback
Node-style callback called with the error, if any, and PartitionResponse |
Returns | |
---|---|
Type | Description |
void |
partitionRead(request)
public partitionRead(request: google.spanner.v1.IPartitionReadRequest): Promise<google.spanner.v1.PartitionResponse>;
Calls PartitionRead.
Parameter | |
---|---|
Name | Description |
request |
IPartitionReadRequest
PartitionReadRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IReadRequest
ReadRequest message or plain object |
callback |
ReadCallback
Node-style callback called with the error, if any, and ResultSet |
Returns | |
---|---|
Type | Description |
void |
read(request)
public read(request: google.spanner.v1.IReadRequest): Promise<google.spanner.v1.ResultSet>;
Calls Read.
Parameter | |
---|---|
Name | Description |
request |
IReadRequest
ReadRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IRollbackRequest
RollbackRequest message or plain object |
callback |
RollbackCallback
Node-style callback called with the error, if any, and Empty |
Returns | |
---|---|
Type | Description |
void |
rollback(request)
public rollback(request: google.spanner.v1.IRollbackRequest): Promise<google.protobuf.Empty>;
Calls Rollback.
Parameter | |
---|---|
Name | Description |
request |
IRollbackRequest
RollbackRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IReadRequest
ReadRequest message or plain object |
callback |
StreamingReadCallback
Node-style callback called with the error, if any, and PartialResultSet |
Returns | |
---|---|
Type | Description |
void |
streamingRead(request)
public streamingRead(request: google.spanner.v1.IReadRequest): Promise<google.spanner.v1.PartialResultSet>;
Calls StreamingRead.
Parameter | |
---|---|
Name | Description |
request |
IReadRequest
ReadRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.spanner.v1.PartialResultSet> | Promise |