Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.
Name | Data Type | Description |
---|---|---|
database
|
string |
Required. The database whose schema we wish to get. |
Name | Data Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
|
GetDatabaseDdlResponse | ||||||||
Properties
|
Updates the schema of a Cloud Spanner database by
creating/altering/dropping tables, columns, indexes, etc. The returned
long-running operation will have a name of
the format <database_name>/operations/<operation_id>
and can be used to
track execution of the schema change(s). The
metadata field type is
UpdateDatabaseDdlMetadata. The operation has no response.
Name | Data Type | Description |
---|---|---|
database
|
string |
Required. The database to update. |
Name | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
UpdateDatabaseDdlRequest | |||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Operation | ||||||||||||||||||||||||||||||||||||
Properties
|
Creates multiple new sessions.
This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 for best practices on session cache management.
Name | Data Type | Description |
---|---|---|
database
|
string |
Required. The database in which the new sessions are created. |
Name | Data Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
BatchCreateSessionsRequest | ||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
BatchCreateSessionsResponse | |||||||||||||||||||||||||||
Properties
|
Lists all sessions in a given database.
Name | Data Type | Description |
---|---|---|
database
|
string |
Required. The database in which to list sessions. |
Name | Data Type | Description |
---|---|---|
pageToken
|
string |
If non-empty, |
pageSize
|
integer |
Number of sessions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. |
filter
|
string |
An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are:
Some examples of using filters are:
|
Name | Data Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ListSessionsResponse | ||||||||||||||||||||||||||||||
Properties
|
Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive transactions.
Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone reads and queries use a transaction internally, and count toward the one transaction limit.
Active sessions use additional server resources, so it is a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions for which no
operations are sent for more than an hour. If a session is deleted,
requests to it return NOT_FOUND
.
Idle sessions can be kept alive by sending a trivial SQL query
periodically, e.g., "SELECT 1"
.
Name | Data Type | Description |
---|---|---|
database
|
string |
Required. The database in which the new session is created. |
Name | Data Type | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CreateSessionRequest | |||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Session | |||||||||||||||||
Properties
|
Drops (aka deletes) a Cloud Spanner database.
Name | Data Type | Description |
---|---|---|
database
|
string |
Required. The database to be dropped. |
Name | Data Type | Description | ||||
---|---|---|---|---|---|---|
|
Empty | |||||
|
Starts asynchronous cancellation on a long-running operation. The server
makes a best effort to cancel the operation, but success is not
guaranteed. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
. Clients can use
Operations.GetOperation or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation,
the operation is not deleted; instead, it becomes an operation with
an Operation.error value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED
.
Name | Data Type | Description |
---|---|---|
name
|
string |
The name of the operation resource to be cancelled. |
Name | Data Type | Description | ||||
---|---|---|---|---|---|---|
|
Empty | |||||
|
Deletes a long-running operation. This method indicates that the client is
no longer interested in the operation result. It does not cancel the
operation. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Name | Data Type | Description |
---|---|---|
name
|
string |
The name of the operation resource to be deleted. |
Name | Data Type | Description | ||||
---|---|---|---|---|---|---|
|
Empty | |||||
|
Gets information about a particular instance configuration.
Name | Data Type | Description |
---|---|---|
name
|
string |
Required. The name of the requested instance configuration. Values are of
the form |
Name | Data Type | Description |
---|---|---|
fieldMask
|
string |
If field_mask is present, specifies the subset of Instance fields that should be returned. If absent, all Instance fields are returned. |
Name | Data Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
InstanceConfig | ||||||||||||||||||||||||||||||
Properties
|
Updates an instance, and begins allocating or releasing resources
as requested. The returned long-running
operation can be used to track the
progress of updating the instance. If the named instance does not
exist, returns NOT_FOUND
.
Immediately upon completion of this request:
Until completion of the returned operation:
CANCELLED
status.Upon completion of the returned operation:
The returned long-running operation will
have a name of the format <instance_name>/operations/<operation_id>
and
can be used to track the instance modification. The
metadata field type is
UpdateInstanceMetadata.
The response field type is
Instance, if successful.
Authorization requires spanner.instances.update
permission on
resource name.
Name | Data Type | Description |
---|---|---|
name
|
string |
Required. A unique identifier for the instance, which cannot be changed
after the instance is created. Values are of the form
|
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
UpdateInstanceRequest | |||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Operation | ||||||||||||||||||||||||||||||||||||
Properties
|
Lists Cloud Spanner databases.
Name | Data Type | Description |
---|---|---|
parent
|
string |
Required. The instance whose databases should be listed.
Values are of the form |
Name | Data Type | Description |
---|---|---|
pageToken
|
string |
If non-empty, |
pageSize
|
integer |
Number of databases to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. |
Name | Data Type | Description | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ListDatabasesResponse | ||||||||||||||||||||||||
Properties
|
Creates a new Cloud Spanner database and starts to prepare it for serving.
The returned long-running operation will
have a name of the format <database_name>/operations/<operation_id>
and
can be used to track preparation of the database. The
metadata field type is
CreateDatabaseMetadata. The
response field type is
Database, if successful.
Name | Data Type | Description |
---|---|---|
parent
|
string |
Required. The name of the instance that will serve the new database.
Values are of the form |
Name | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CreateDatabaseRequest | |||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Operation | ||||||||||||||||||||||||||||||||||||
Properties
|
Lists the supported instance configurations for a given project.
Name | Data Type | Description |
---|---|---|
parent
|
string |
Required. The name of the project for which a list of supported instance
configurations is requested. Values are of the form
|
Name | Data Type | Description |
---|---|---|
pageToken
|
string |
If non-empty, |
pageSize
|
integer |
Number of instance configurations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. |
Name | Data Type | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ListInstanceConfigsResponse | |||||||||||||||||||||||||||
Properties
|
Lists all instances in the given project.
Name | Data Type | Description |
---|---|---|
parent
|
string |
Required. The name of the project for which a list of instances is
requested. Values are of the form |
Name | Data Type | Description |
---|---|---|
pageToken
|
string |
If non-empty, |
pageSize
|
integer |
Number of instances to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. |
filter
|
string |
An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are:
Some examples of using filters are:
|
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ListInstancesResponse | |||||||||||||||||||||||||||||||||||||||
Properties
|
Creates an instance and begins preparing it to begin serving. The
returned long-running operation
can be used to track the progress of preparing the new
instance. The instance name is assigned by the caller. If the
named instance already exists, CreateInstance
returns
ALREADY_EXISTS
.
Immediately upon completion of this request:
CREATING
.Until completion of the returned operation:
Upon completion of the returned operation:
READY
.The returned long-running operation will
have a name of the format <instance_name>/operations/<operation_id>
and
can be used to track creation of the instance. The
metadata field type is
CreateInstanceMetadata.
The response field type is
Instance, if successful.
Name | Data Type | Description |
---|---|---|
parent
|
string |
Required. The name of the project in which to create the instance. Values
are of the form |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CreateInstanceRequest | |||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Operation | ||||||||||||||||||||||||||||||||||||
Properties
|
Gets the access control policy for a database resource. Returns an empty policy if a database exists but does not have a policy set.
Authorization requires spanner.databases.getIamPolicy
permission on
resource.
Name | Data Type | Description |
---|---|---|
resource
|
string |
REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is |
Name | Data Type | Description | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
GetIamPolicyRequest | ||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Policy | ||||||||||||||||||||||||||||||
Properties
|
Sets the access control policy on a database resource. Replaces any existing policy.
Authorization requires spanner.databases.setIamPolicy
permission on resource.
Name | Data Type | Description |
---|---|---|
resource
|
string |
REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is |
Name | Data Type | Description | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SetIamPolicyRequest | ||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Policy | ||||||||||||||||||||||||||||||
Properties
|
Returns permissions that the caller has on the specified database resource.
Attempting this RPC on a non-existent Cloud Spanner database will
result in a NOT_FOUND error if the user has
spanner.databases.list
permission on the containing Cloud
Spanner instance. Otherwise returns an empty set of permissions.
Name | Data Type | Description |
---|---|---|
resource
|
string |
REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is |
Name | Data Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
|
TestIamPermissionsRequest | ||||||||
Properties
|
Name | Data Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
|
TestIamPermissionsResponse | ||||||||
Properties
|
Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the transaction runs. |
Name | Data Type | Description | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
BeginTransactionRequest | ||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Transaction | |||||||||||
Properties
|
Commits a transaction. The request includes the mutations to be applied to rows in the database.
Commit
might return an ABORTED
error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If Commit
returns ABORTED
, the caller should re-attempt
the transaction from the beginning, re-using the same session.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the transaction to be committed is running. |
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CommitRequest | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
|
CommitResponse | ||||||||
Properties
|
Executes a batch of SQL DML statements. This method allows many statements to be run with lower latency than submitting them sequentially with ExecuteSql.
Statements are executed in sequential order. A request can succeed even if a statement fails. The ExecuteBatchDmlResponse.status field in the response provides information about the statement that failed. Clients must inspect this field to determine whether an error occurred.
Execution stops after the first failed statement; the remaining statements are not executed.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the DML statements should be performed. |
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ExecuteBatchDmlRequest | ||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ExecuteBatchDmlResponse | |||||||||||||||||||||||||||||||||||||||||||
Properties
|
Executes an SQL statement, returning all results in a single reply. This
method cannot be used to return a result set larger than 10 MiB;
if the query yields more data than that, the query fails with
a FAILED_PRECONDITION
error.
Operations inside read-write transactions might return ABORTED
. If
this occurs, the application should restart the transaction from
the beginning. See Transaction for more details.
Larger result sets can be fetched in streaming fashion by calling ExecuteStreamingSql instead.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the SQL query should be performed. |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ExecuteSqlRequest | |||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ResultSet | ||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Like ExecuteSql, except returns the result set as a stream. Unlike ExecuteSql, 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.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the SQL query should be performed. |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ExecuteSqlRequest | |||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
PartialResultSet | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Creates a set of partition tokens that can be used to execute a query operation in parallel. Each of the returned partition tokens can be used by ExecuteStreamingSql to specify a subset of the query result to read. The same session and read-only transaction must be used by the PartitionQueryRequest used to create the partition tokens and the ExecuteSqlRequests that use the partition tokens.
Partition tokens become invalid when the session used to create them is deleted, is idle for too long, begins a new transaction, or becomes too old. When any of these happen, it is not possible to resume the query, and the whole operation must be restarted from the beginning.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session used to create the partitions. |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
PartitionQueryRequest | |||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
PartitionResponse | ||||||||||||||||||||||||||||||||||
Properties
|
Creates a set of partition tokens that can be used to execute a read operation in parallel. Each of the returned partition tokens can be used by StreamingRead to specify a subset of the read result to read. The same session and read-only transaction must be used by the PartitionReadRequest used to create the partition tokens and the ReadRequests that use the partition tokens. There are no ordering guarantees on rows returned among the returned partition tokens, or even within each individual StreamingRead call issued with a partition_token.
Partition tokens become invalid when the session used to create them is deleted, is idle for too long, begins a new transaction, or becomes too old. When any of these happen, it is not possible to resume the read, and the whole operation must be restarted from the beginning.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session used to create the partitions. |
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
PartitionReadRequest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
PartitionResponse | ||||||||||||||||||||||||||||||||||
Properties
|
Reads rows from the database using key lookups and scans, as a
simple key/value style alternative to
ExecuteSql. This method cannot be used to
return a result set larger than 10 MiB; if the read matches more
data than that, the read fails with a FAILED_PRECONDITION
error.
Reads inside read-write transactions might return ABORTED
. If
this occurs, the application should restart the transaction from
the beginning. See Transaction for more details.
Larger result sets can be yielded in streaming fashion by calling StreamingRead instead.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the read should be performed. |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ReadRequest | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ResultSet | ||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Rolls back a transaction, releasing any locks it holds. It is a good idea to call this for any transaction that includes one or more Read or ExecuteSql requests and ultimately decides not to commit.
Rollback
returns OK
if it successfully aborts the transaction, the
transaction was already aborted, or the transaction is not
found. Rollback
never returns ABORTED
.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the transaction to roll back is running. |
Name | Data Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
|
RollbackRequest | ||||||||
Properties
|
Name | Data Type | Description | ||||
---|---|---|---|---|---|---|
|
Empty | |||||
|
Like Read, except returns the result set as a stream. Unlike Read, 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.
Name | Data Type | Description |
---|---|---|
session
|
string |
Required. The session in which the read should be performed. |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ReadRequest | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
PartialResultSet | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
The request for BatchCreateSessions.
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sessionTemplate
|
Session |
Parameters to be applied to each created session. |
||||||||||||||||
Properties
|
||||||||||||||||||
sessionCount
|
integer |
Required. The number of sessions to be created in this batch call. The API may return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to BatchCreateSessions (adjusting session_count as necessary). |
The response for BatchCreateSessions.
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
session
|
array [Session] |
The freshly created sessions. |
||||||||||||||||
Properties
|
The request for BeginTransaction.
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options
|
TransactionOptions |
Required. Options for the new transaction. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
Associates members
with a role
.
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
role
|
string |
Role that is assigned to |
||||||||||||||||
members
|
array [string] |
Specifies the identities requesting access for a Cloud Platform resource.
|
||||||||||||||||
condition
|
Expr |
The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. |
||||||||||||||||
Properties
|
Metadata associated with a parent-child relationship appearing in a PlanNode.
Name | Data Type | Description |
---|---|---|
variable
|
string |
Only present if the child node is SCALAR and corresponds
to an output variable of the parent node. The field carries the name of
the output variable.
For example, a |
type
|
string |
The type of the link. For example, in Hash Joins this could be used to distinguish between the build child and the probe child, or in the case of the child being an output variable, to represent the tag associated with the output variable. |
childIndex
|
integer |
The node to which the link points. |
The request for Commit.
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transactionId
|
byte |
Commit a previously-started transaction. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
singleUseTransaction
|
TransactionOptions |
Execute mutations in a temporary transaction. Note that unlike
commit of a previously-started transaction, commit with a
temporary transaction is non-idempotent. That is, if the
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mutations
|
array [Mutation] |
The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
The response for Commit.
Name | Data Type | Description |
---|---|---|
commitTimestamp
|
string |
The Cloud Spanner timestamp at which the transaction committed. |
Metadata type for the operation returned by CreateDatabase.
Name | Data Type | Description |
---|---|---|
database
|
string |
The database being created. |
The request for CreateDatabase.
Name | Data Type | Description |
---|---|---|
extraStatements
|
array [string] |
An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. |
createStatement
|
string |
Required. A |
Metadata type for the operation returned by CreateInstance.
Name | Data Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
startTime
|
string |
The time at which the CreateInstance request was received. |
|||||||||||||||||||||||||
instance
|
Instance |
The instance being created. |
|||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||
endTime
|
string |
The time at which this operation failed or was completed successfully. |
|||||||||||||||||||||||||
cancelTime
|
string |
The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again. |
The request for CreateInstance.
Name | Data Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
instanceId
|
string |
Required. The ID of the instance to create. Valid identifiers are of the
form |
|||||||||||||||||||||||||
instance
|
Instance |
Required. The instance to create. The name may be omitted, but if
specified must be |
|||||||||||||||||||||||||
Properties
|
The request for CreateSession.
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
session
|
Session |
The session to create. |
||||||||||||||||
Properties
|
A Cloud Spanner database.
Name | Data Type | Description |
---|---|---|
state
|
string Allowed values: - STATE_UNSPECIFIED - CREATING - READY |
Output only. The current database state. |
name
|
string |
Required. The name of the database. Values are of the form
|
Arguments to delete operations.
Name | Data Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
table
|
string |
Required. The table whose rows will be deleted. |
||||||||||||||||||||||||||||||||
keySet
|
KeySet |
Required. The primary keys of the rows within table to delete. Delete is idempotent. The transaction will succeed even if some or all rows do not exist. |
||||||||||||||||||||||||||||||||
Properties
|
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
The JSON representation for Empty
is empty JSON object {}
.
Name | Data Type | Description |
---|---|---|
Empty
|
object |
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
The JSON representation for |
The request for ExecuteBatchDml.
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transaction
|
TransactionSelector |
Required. The transaction to use. Must be a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
statements
|
array [Statement] |
Required. The list of statements to execute in this batch. Statements are executed
serially, such that the effects of statement Callers must provide at least one statement. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
seqno
|
string |
Required. A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution. |
The response for ExecuteBatchDml. Contains a list of ResultSet messages, one for each DML statement that has successfully executed, in the same order as the statements in the request. If a statement fails, the status in the response body identifies the cause of the failure.
To check for DML statements that failed, use the following approach:
OK
indicates that all statements were executed successfully.OK
, check the number of result sets in the
response. If the response contains N
ResultSet messages, then
statement N+1
in the request failed.Example 1:
OK
.Example 2:
INVALID_ARGUMENT
)
status. The number of ResultSet messages indicates that the third
statement failed, and the fourth and fifth statements were not executed.Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status
|
Status |
If all DML statements are executed successfully, the status is |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resultSets
|
array [ResultSet] |
One ResultSet for each statement in the request that ran successfully, in the same order as the statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each ResultSet contain the number of rows modified by the statement. Only the first ResultSet in the response contains valid ResultSetMetadata. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
The request for ExecuteSql and ExecuteStreamingSql.
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transaction
|
TransactionSelector |
The transaction to use. For queries, if none is provided, the default is a temporary read-only transaction with strong concurrency. Standard DML statements require a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sql
|
string |
Required. The SQL string. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
seqno
|
string |
A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution. Required for DML statements. Ignored for queries. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resumeToken
|
byte |
If this request is resuming a previously interrupted SQL statement
execution, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
queryMode
|
string Allowed values: - NORMAL - PLAN - PROFILE |
Used to control the amount of debugging information returned in ResultSetStats. If partition_token is set, query_mode can only be set to QueryMode.NORMAL. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
partitionToken
|
byte |
If present, results will be restricted to the specified partition previously created using PartitionQuery(). There must be an exact match for the values of fields common to this message and the PartitionQueryRequest message used to create this partition_token. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
params
|
object |
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example:
It is an error to execute a SQL statement with unbound parameters. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paramTypes
|
object |
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value. For example, values of type In these cases, |
Represents an expression text. Example:
title: "User account presence"
description: "Determines whether the request has a user account"
expression: "size(request.user) > 0"
Name | Data Type | Description |
---|---|---|
title
|
string |
An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. |
location
|
string |
An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. |
expression
|
string |
Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported. |
description
|
string |
An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. |
Message representing a single field of a struct.
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type
|
Type |
The type of the field. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name
|
string |
The name of the field. For reads, this is the column name. For
SQL queries, it is the column alias (e.g., |
The response for GetDatabaseDdl.
Name | Data Type | Description |
---|---|---|
statements
|
array [string] |
A list of formatted DDL statements defining the schema of the database specified in the request. |
Request message for GetIamPolicy
method.
Name | Data Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
options
|
GetPolicyOptions |
OPTIONAL: A |
|||||||
Properties
|
Encapsulates settings provided to GetIamPolicy.
Name | Data Type | Description |
---|---|---|
requestedPolicyVersion
|
integer |
Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. |
An isolated set of Cloud Spanner resources on which databases can be hosted.
Name | Data Type | Description |
---|---|---|
state
|
string Allowed values: - STATE_UNSPECIFIED - CREATING - READY |
Output only. The current instance state. For
CreateInstance, the state must be
either omitted or set to |
nodeCount
|
integer |
The number of nodes allocated to this instance. This
may be zero in API responses for instances that are not yet in state
See the documentation for more information about nodes. |
name
|
string |
Required. A unique identifier for the instance, which cannot be changed
after the instance is created. Values are of the form
|
labels
|
object |
Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.).
See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. And so you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + "" + value would prove problematic if we were to allow "" in a future release. |
endpointUris
|
array [string] |
Output only. A set of endpoint URIs based on your instance config
that you can use instead of the global endpoint For example, if your instance config is The client libraries, JDBC drivers, and other SDK clients automatically call these instance specific endpoints. If you are using DNS whitelists, firewalls, or filtering to control access
to endpoints, make sure you grant access to |
displayName
|
string |
Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. |
config
|
string |
Required. The name of the instance's configuration. Values are of the form
|
A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.
Name | Data Type | Description | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
replicas
|
array [ReplicaInfo] |
The geographic placement of nodes in this instance configuration and their replication properties. |
|||||||||||||
Properties
|
|||||||||||||||
name
|
string |
A unique identifier for the instance configuration. Values
are of the form
|
|||||||||||||
displayName
|
string |
The name of this instance configuration as it appears in UIs. |
KeyRange represents a range of rows in a table or index.
A range has a start key and an end key. These keys can be open or closed, indicating if the range includes rows with that key.
Keys are represented by lists, where the ith value in the list corresponds to the ith component of the table or index primary key. Individual values are encoded as described here.
For example, consider the following table definition:
CREATE TABLE UserEvents (
UserName STRING(MAX),
EventDate STRING(10)
) PRIMARY KEY(UserName, EventDate);
The following keys name rows in this table:
"Bob", "2014-09-23"
Since the UserEvents
table's PRIMARY KEY
clause names two
columns, each UserEvents
key has two elements; the first is the
UserName
, and the second is the EventDate
.
Key ranges with multiple components are interpreted
lexicographically by component using the table or index key's declared
sort order. For example, the following range returns all events for
user "Bob"
that occurred in the year 2015:
"start_closed": ["Bob", "2015-01-01"]
"end_closed": ["Bob", "2015-12-31"]
Start and end keys can omit trailing key components. This affects the inclusion and exclusion of rows that exactly match the provided key components: if the key is closed, then rows that exactly match the provided components are included; if the key is open, then rows that exactly match are not included.
For example, the following range includes all events for "Bob"
that
occurred during and after the year 2000:
"start_closed": ["Bob", "2000-01-01"]
"end_closed": ["Bob"]
The next example retrieves all events for "Bob"
:
"start_closed": ["Bob"]
"end_closed": ["Bob"]
To retrieve events before the year 2000:
"start_closed": ["Bob"]
"end_open": ["Bob", "2000-01-01"]
The following range includes all rows in the table:
"start_closed": []
"end_closed": []
This range returns all users whose UserName
begins with any
character from A to C:
"start_closed": ["A"]
"end_open": ["D"]
This range returns all users whose UserName
begins with B:
"start_closed": ["B"]
"end_open": ["C"]
Key ranges honor column sort order. For example, suppose a table is defined as follows:
CREATE TABLE DescendingSortedTable {
Key INT64,
...
) PRIMARY KEY(Key DESC);
The following range retrieves all rows with key values between 1 and 100 inclusive:
"start_closed": ["100"]
"end_closed": ["1"]
Note that 100 is passed as the start, and 1 is passed as the end,
because Key
is a descending column in the schema.
Name | Data Type | Description |
---|---|---|
startOpen
|
array [] |
If the start is open, then the range excludes rows whose first
|
startClosed
|
array [] |
If the start is closed, then the range includes all rows whose
first |
endOpen
|
array [] |
If the end is open, then the range excludes rows whose first
|
endClosed
|
array [] |
If the end is closed, then the range includes all rows whose
first |
KeySet
defines a collection of Cloud Spanner keys and/or key ranges. All
the keys are expected to be in the same table or index. The keys need
not be sorted in any particular way.
If the same key is specified multiple times in the set (for example if two ranges, two keys, or a key and a range overlap), Cloud Spanner behaves as if the key were only specified once.
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ranges
|
array [KeyRange] |
A list of key ranges. See KeyRange for more information about key range specifications. |
||||||||||||||||
Properties
|
||||||||||||||||||
keys
|
array [array] |
A list of specific keys. Entries in |
||||||||||||||||
all
|
boolean |
For convenience |
The response for ListDatabases.
Name | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
nextPageToken
|
string |
|
||||||||||
databases
|
array [Database] |
Databases that matched the request. |
||||||||||
Properties
|
The response for ListInstanceConfigs.
Name | Data Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nextPageToken
|
string |
|
|||||||||||||||||||||||||||||
instanceConfigs
|
array [InstanceConfig] |
The list of requested instance configurations. |
|||||||||||||||||||||||||||||
Properties
|
The response for ListInstances.
Name | Data Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nextPageToken
|
string |
|
|||||||||||||||||||||||||
instances
|
array [Instance] |
The list of requested instances. |
|||||||||||||||||||||||||
Properties
|
The response message for Operations.ListOperations.
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operations
|
array [Operation] |
A list of operations that matches the specified filter in the request. |
|||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||
nextPageToken
|
string |
The standard List next-page token. |
The response for ListSessions.
Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sessions
|
array [Session] |
The list of requested sessions. |
||||||||||||||||
Properties
|
||||||||||||||||||
nextPageToken
|
string |
|
A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a Commit call.
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
update
|
Write |
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error |
|||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
replace
|
Write |
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become In an interleaved table, if you create the child table with the
|
|||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
insertOrUpdate
|
Write |
Like insert, except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved. When using insert_or_update, just as when using insert, all |
|||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
insert
|
Write |
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error |
|||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
delete
|
Delete |
Delete rows from a table. Succeeds whether or not the named rows were present. |
|||||||||||||||||||||||||||||||||||||||||||||
Properties
|
This resource represents a long-running operation that is the result of a network API call.
Name | Data Type | Description | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
response
|
object |
The normal response of the operation in case of success. If the original
method returns no data on success, such as |
|||||||||||||
name
|
string |
The server-assigned name, which is only unique within the same service that
originally returns it. If you use the default HTTP mapping, the
|
|||||||||||||
metadata
|
object |
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
|||||||||||||
error
|
Status |
The error result of the operation in case of failure or cancellation. |
|||||||||||||
Properties
|
|||||||||||||||
done
|
boolean |
If the value is |
Partial results from a streaming read or SQL query. Streaming reads and SQL queries better tolerate large result sets, large rows, and large values, but are a little trickier to consume.
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
values
|
array [] |
A streamed result set consists of a stream of values, which might
be split into many Most values are encoded based on type as described here. It is possible that the last value in values is "chunked",
meaning that the rest of the value is sent in subsequent
Some examples of merging:
For a more complete example, suppose a streaming SQL query is
yielding a result set whose rows contain a single string
field. The following
This sequence of |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
stats
|
ResultSetStats |
Query plan and execution statistics for the statement that produced this streaming result set. These can be requested by setting ExecuteSqlRequest.query_mode and are sent only once with the last response in the stream. This field will also be present in the last response for DML statements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resumeToken
|
byte |
Streaming calls might be interrupted for a variety of reasons, such
as TCP connection loss. If this occurs, the stream of results can
be resumed by re-sending the original request and including
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata
|
ResultSetMetadata |
Metadata about the result set, such as row type information. Only present in the first response. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chunkedValue
|
boolean |
If true, then the final value in values is chunked, and must
be combined with more values from subsequent |
Information returned for each partition returned in a PartitionResponse.
Name | Data Type | Description |
---|---|---|
partitionToken
|
byte |
This token can be passed to Read, StreamingRead, ExecuteSql, or ExecuteStreamingSql requests to restrict the results to those identified by this partition token. |
Options for a PartitionQueryRequest and PartitionReadRequest.
Name | Data Type | Description |
---|---|---|
partitionSizeBytes
|
string |
Note: This hint is currently ignored by PartitionQuery and PartitionRead requests. The desired data size for each partition generated. The default for this option is currently 1 GiB. This is only a hint. The actual size of each partition may be smaller or larger than this size request. |
maxPartitions
|
string |
Note: This hint is currently ignored by PartitionQuery and PartitionRead requests. The desired maximum number of partitions to return. For example, this may be set to the number of workers available. The default for this option is currently 10,000. The maximum value is currently 200,000. This is only a hint. The actual number of partitions returned may be smaller or larger than this maximum count request. |
The request for PartitionQuery
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transaction
|
TransactionSelector |
Read only snapshot transactions are supported, read/write and single use transactions are not. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sql
|
string |
Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. The query plan of a root partitionable query has a single distributed union operator. A distributed union operator conceptually divides one or more tables into multiple splits, remotely evaluates a subquery independently on each split, and then unions all results. This must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use ExecuteStreamingSql with a PartitionedDml transaction for large, partition-friendly DML operations. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
partitionOptions
|
PartitionOptions |
Additional options that affect how many partitions are created. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
params
|
object |
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example:
It is an error to execute a SQL statement with unbound parameters. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paramTypes
|
object |
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value. For example, values of type In these cases, |
The request for PartitionRead
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transaction
|
TransactionSelector |
Read only snapshot transactions are supported, read/write and single use transactions are not. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|