Spanner

google.spanner.v1. Spanner

Represents a Spanner

Constructor

new Spanner(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Spanner service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Spanner}

Creates new Spanner service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

batchCreateSessions(request, callback) → {undefined}

Calls BatchCreateSessions.

Parameters:
Name Type Description
request google.spanner.v1.IBatchCreateSessionsRequest

BatchCreateSessionsRequest message or plain object

callback google.spanner.v1.Spanner.BatchCreateSessionsCallback

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

batchCreateSessions(request) → {Promise.<google.spanner.v1.BatchCreateSessionsResponse>}

Calls BatchCreateSessions.

Parameters:
Name Type Description
request google.spanner.v1.IBatchCreateSessionsRequest

BatchCreateSessionsRequest message or plain object

beginTransaction(request, callback) → {undefined}

Calls BeginTransaction.

Parameters:
Name Type Description
request google.spanner.v1.IBeginTransactionRequest

BeginTransactionRequest message or plain object

callback google.spanner.v1.Spanner.BeginTransactionCallback

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

beginTransaction(request) → {Promise.<google.spanner.v1.Transaction>}

Calls BeginTransaction.

Parameters:
Name Type Description
request google.spanner.v1.IBeginTransactionRequest

BeginTransactionRequest message or plain object

commit(request, callback) → {undefined}

Calls Commit.

Parameters:
Name Type Description
request google.spanner.v1.ICommitRequest

CommitRequest message or plain object

callback google.spanner.v1.Spanner.CommitCallback

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

commit(request) → {Promise.<google.spanner.v1.CommitResponse>}

Calls Commit.

Parameters:
Name Type Description
request google.spanner.v1.ICommitRequest

CommitRequest message or plain object

createSession(request, callback) → {undefined}

Calls CreateSession.

Parameters:
Name Type Description
request google.spanner.v1.ICreateSessionRequest

CreateSessionRequest message or plain object

callback google.spanner.v1.Spanner.CreateSessionCallback

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

createSession(request) → {Promise.<google.spanner.v1.Session>}

Calls CreateSession.

Parameters:
Name Type Description
request google.spanner.v1.ICreateSessionRequest

CreateSessionRequest message or plain object

deleteSession(request, callback) → {undefined}

Calls DeleteSession.

Parameters:
Name Type Description
request google.spanner.v1.IDeleteSessionRequest

DeleteSessionRequest message or plain object

callback google.spanner.v1.Spanner.DeleteSessionCallback

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

deleteSession(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteSession.

Parameters:
Name Type Description
request google.spanner.v1.IDeleteSessionRequest

DeleteSessionRequest message or plain object

executeBatchDml(request, callback) → {undefined}

Calls ExecuteBatchDml.

Parameters:
Name Type Description
request google.spanner.v1.IExecuteBatchDmlRequest

ExecuteBatchDmlRequest message or plain object

callback google.spanner.v1.Spanner.ExecuteBatchDmlCallback

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

executeBatchDml(request) → {Promise.<google.spanner.v1.ExecuteBatchDmlResponse>}

Calls ExecuteBatchDml.

Parameters:
Name Type Description
request google.spanner.v1.IExecuteBatchDmlRequest

ExecuteBatchDmlRequest message or plain object

executeSql(request, callback) → {undefined}

Calls ExecuteSql.

Parameters:
Name Type Description
request google.spanner.v1.IExecuteSqlRequest

ExecuteSqlRequest message or plain object

callback google.spanner.v1.Spanner.ExecuteSqlCallback

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

executeSql(request) → {Promise.<google.spanner.v1.ResultSet>}

Calls ExecuteSql.

Parameters:
Name Type Description
request google.spanner.v1.IExecuteSqlRequest

ExecuteSqlRequest message or plain object

executeStreamingSql(request, callback) → {undefined}

Calls ExecuteStreamingSql.

Parameters:
Name Type Description
request google.spanner.v1.IExecuteSqlRequest

ExecuteSqlRequest message or plain object

callback google.spanner.v1.Spanner.ExecuteStreamingSqlCallback

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

executeStreamingSql(request) → {Promise.<google.spanner.v1.PartialResultSet>}

Calls ExecuteStreamingSql.

Parameters:
Name Type Description
request google.spanner.v1.IExecuteSqlRequest

ExecuteSqlRequest message or plain object

getSession(request, callback) → {undefined}

Calls GetSession.

Parameters:
Name Type Description
request google.spanner.v1.IGetSessionRequest

GetSessionRequest message or plain object

callback google.spanner.v1.Spanner.GetSessionCallback

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

getSession(request) → {Promise.<google.spanner.v1.Session>}

Calls GetSession.

Parameters:
Name Type Description
request google.spanner.v1.IGetSessionRequest

GetSessionRequest message or plain object

listSessions(request, callback) → {undefined}

Calls ListSessions.

Parameters:
Name Type Description
request google.spanner.v1.IListSessionsRequest

ListSessionsRequest message or plain object

callback google.spanner.v1.Spanner.ListSessionsCallback

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

listSessions(request) → {Promise.<google.spanner.v1.ListSessionsResponse>}

Calls ListSessions.

Parameters:
Name Type Description
request google.spanner.v1.IListSessionsRequest

ListSessionsRequest message or plain object

partitionQuery(request, callback) → {undefined}

Calls PartitionQuery.

Parameters:
Name Type Description
request google.spanner.v1.IPartitionQueryRequest

PartitionQueryRequest message or plain object

callback google.spanner.v1.Spanner.PartitionQueryCallback

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

partitionQuery(request) → {Promise.<google.spanner.v1.PartitionResponse>}

Calls PartitionQuery.

Parameters:
Name Type Description
request google.spanner.v1.IPartitionQueryRequest

PartitionQueryRequest message or plain object

partitionRead(request, callback) → {undefined}

Calls PartitionRead.

Parameters:
Name Type Description
request google.spanner.v1.IPartitionReadRequest

PartitionReadRequest message or plain object

callback google.spanner.v1.Spanner.PartitionReadCallback

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

partitionRead(request) → {Promise.<google.spanner.v1.PartitionResponse>}

Calls PartitionRead.

Parameters:
Name Type Description
request google.spanner.v1.IPartitionReadRequest

PartitionReadRequest message or plain object

read(request, callback) → {undefined}

Calls Read.

Parameters:
Name Type Description
request google.spanner.v1.IReadRequest

ReadRequest message or plain object

callback google.spanner.v1.Spanner.ReadCallback

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

read(request) → {Promise.<google.spanner.v1.ResultSet>}

Calls Read.

Parameters:
Name Type Description
request google.spanner.v1.IReadRequest

ReadRequest message or plain object

rollback(request, callback) → {undefined}

Calls Rollback.

Parameters:
Name Type Description
request google.spanner.v1.IRollbackRequest

RollbackRequest message or plain object

callback google.spanner.v1.Spanner.RollbackCallback

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

rollback(request) → {Promise.<google.protobuf.Empty>}

Calls Rollback.

Parameters:
Name Type Description
request google.spanner.v1.IRollbackRequest

RollbackRequest message or plain object

streamingRead(request, callback) → {undefined}

Calls StreamingRead.

Parameters:
Name Type Description
request google.spanner.v1.IReadRequest

ReadRequest message or plain object

callback google.spanner.v1.Spanner.StreamingReadCallback

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

streamingRead(request) → {Promise.<google.spanner.v1.PartialResultSet>}

Calls StreamingRead.

Parameters:
Name Type Description
request google.spanner.v1.IReadRequest

ReadRequest message or plain object

Type Definitions

BatchCreateSessionsCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#batchCreateSessions.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.BatchCreateSessionsResponse <optional>

BatchCreateSessionsResponse

BeginTransactionCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#beginTransaction.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.Transaction <optional>

Transaction

CommitCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#commit.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.CommitResponse <optional>

CommitResponse

CreateSessionCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#createSession.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.Session <optional>

Session

DeleteSessionCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#deleteSession.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

ExecuteBatchDmlCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#executeBatchDml.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.ExecuteBatchDmlResponse <optional>

ExecuteBatchDmlResponse

ExecuteSqlCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#executeSql.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.ResultSet <optional>

ResultSet

ExecuteStreamingSqlCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#executeStreamingSql.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.PartialResultSet <optional>

PartialResultSet

GetSessionCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#getSession.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.Session <optional>

Session

ListSessionsCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#listSessions.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.ListSessionsResponse <optional>

ListSessionsResponse

PartitionQueryCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#partitionQuery.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.PartitionResponse <optional>

PartitionResponse

PartitionReadCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#partitionRead.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.PartitionResponse <optional>

PartitionResponse

ReadCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#read.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.ResultSet <optional>

ResultSet

RollbackCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#rollback.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

StreamingReadCallback(error, responseopt)

Callback as used by google.spanner.v1.Spanner#streamingRead.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.spanner.v1.PartialResultSet <optional>

PartialResultSet