com.google.spanner.v1.spanner

Members list

Type members

Classlikes

final case class BatchCreateSessionsRequest(database: String, sessionTemplate: Option[Session], sessionCount: Int, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[BatchCreateSessionsRequest]

The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].

The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].

Value parameters

database

Required. The database in which the new sessions are created.

sessionCount

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][google.spanner.v1.BatchCreateSessionsRequest.session_count] as necessary).

sessionTemplate

Parameters to be applied to each created session.

Attributes

Companion
object
Source
BatchCreateSessionsRequest.scala
Supertypes
trait Updatable[BatchCreateSessionsRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BatchCreateSessionsRequest extends GeneratedMessageCompanion[BatchCreateSessionsRequest]

Attributes

Companion
class
Source
BatchCreateSessionsRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BatchCreateSessionsRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class BatchCreateSessionsResponse(session: Seq[Session], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[BatchCreateSessionsResponse]

The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].

The response for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].

Value parameters

session

The freshly created sessions.

Attributes

Companion
object
Source
BatchCreateSessionsResponse.scala
Supertypes
trait Updatable[BatchCreateSessionsResponse]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BatchCreateSessionsResponse extends GeneratedMessageCompanion[BatchCreateSessionsResponse]

Attributes

Companion
class
Source
BatchCreateSessionsResponse.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BatchCreateSessionsResponse]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class BatchWriteRequest(session: String, requestOptions: Option[RequestOptions], mutationGroups: Seq[MutationGroup], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[BatchWriteRequest]

The request for [BatchWrite][google.spanner.v1.Spanner.BatchWrite].

The request for [BatchWrite][google.spanner.v1.Spanner.BatchWrite].

Value parameters

mutationGroups

Required. The groups of mutations to be applied.

requestOptions

Common options for this request.

session

Required. The session in which the batch request is to be run.

Attributes

Companion
object
Source
BatchWriteRequest.scala
Supertypes
trait Updatable[BatchWriteRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BatchWriteRequest extends GeneratedMessageCompanion[BatchWriteRequest]

Attributes

Companion
class
Source
BatchWriteRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BatchWriteRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class BatchWriteResponse(indexes: Seq[Int], status: Option[Status], commitTimestamp: Option[Timestamp], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[BatchWriteResponse]

The result of applying a batch of mutations.

The result of applying a batch of mutations.

Value parameters

commitTimestamp

The commit timestamp of the transaction that applied this batch. Present if status is OK, absent otherwise.

indexes

The mutation groups applied in this batch. The values index into the mutation_groups field in the corresponding BatchWriteRequest.

status

An OK status indicates success. Any other status indicates a failure.

Attributes

Companion
object
Source
BatchWriteResponse.scala
Supertypes
trait Updatable[BatchWriteResponse]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BatchWriteResponse extends GeneratedMessageCompanion[BatchWriteResponse]

Attributes

Companion
class
Source
BatchWriteResponse.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BatchWriteResponse]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class BeginTransactionRequest(session: String, options: Option[TransactionOptions], requestOptions: Option[RequestOptions], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[BeginTransactionRequest]

The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].

The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].

Value parameters

options

Required. Options for the new transaction.

requestOptions

Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not do anything. To set the priority for a transaction, set it on the reads and writes that are part of this transaction instead.

session

Required. The session in which the transaction runs.

Attributes

Companion
object
Source
BeginTransactionRequest.scala
Supertypes
trait Updatable[BeginTransactionRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BeginTransactionRequest extends GeneratedMessageCompanion[BeginTransactionRequest]

Attributes

Companion
class
Source
BeginTransactionRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BeginTransactionRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class CommitRequest(session: String, transaction: Transaction, mutations: Seq[Mutation], returnCommitStats: Boolean, requestOptions: Option[RequestOptions], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[CommitRequest]

The request for [Commit][google.spanner.v1.Spanner.Commit].

The request for [Commit][google.spanner.v1.Spanner.Commit].

Value parameters

mutations

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

requestOptions

Common options for this request.

returnCommitStats

If true, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is false.

session

Required. The session in which the transaction to be committed is running.

Attributes

Companion
object
Source
CommitRequest.scala
Supertypes
trait Updatable[CommitRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CommitRequest extends GeneratedMessageCompanion[CommitRequest]

Attributes

Companion
class
Source
CommitRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[CommitRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class CreateSessionRequest(database: String, session: Option[Session], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[CreateSessionRequest]

The request for [CreateSession][google.spanner.v1.Spanner.CreateSession].

The request for [CreateSession][google.spanner.v1.Spanner.CreateSession].

Value parameters

database

Required. The database in which the new session is created.

session

Required. The session to create.

Attributes

Companion
object
Source
CreateSessionRequest.scala
Supertypes
trait Updatable[CreateSessionRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CreateSessionRequest extends GeneratedMessageCompanion[CreateSessionRequest]

Attributes

Companion
class
Source
CreateSessionRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[CreateSessionRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class DeleteSessionRequest(name: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[DeleteSessionRequest]

The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession].

The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession].

Value parameters

name

Required. The name of the session to delete.

Attributes

Companion
object
Source
DeleteSessionRequest.scala
Supertypes
trait Updatable[DeleteSessionRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DeleteSessionRequest extends GeneratedMessageCompanion[DeleteSessionRequest]

Attributes

Companion
class
Source
DeleteSessionRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[DeleteSessionRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ExecuteBatchDmlRequest(session: String, transaction: Option[TransactionSelector], statements: Seq[Statement], seqno: Long, requestOptions: Option[RequestOptions], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ExecuteBatchDmlRequest]

The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml].

The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml].

Value parameters

requestOptions

Common options for this request.

seqno

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.

session

Required. The session in which the DML statements should be performed.

statements

Required. The list of statements to execute in this batch. Statements are executed serially, such that the effects of statement i are visible to statement i+1. Each statement must be a DML statement. Execution stops at the first failed statement; the remaining statements are not executed. Callers must provide at least one statement.

transaction

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.

Attributes

Companion
object
Source
ExecuteBatchDmlRequest.scala
Supertypes
trait Updatable[ExecuteBatchDmlRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ExecuteBatchDmlRequest extends GeneratedMessageCompanion[ExecuteBatchDmlRequest]

Attributes

Companion
class
Source
ExecuteBatchDmlRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ExecuteBatchDmlRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ExecuteBatchDmlResponse(resultSets: Seq[ResultSet], status: Option[Status], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ExecuteBatchDmlResponse]

The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list of [ResultSet][google.spanner.v1.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.

The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list of [ResultSet][google.spanner.v1.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:

  1. Check the status in the response message. The [google.rpc.Code][google.rpc.Code] enum value OK indicates that all statements were executed successfully.
  2. If the status was not OK, check the number of result sets in the response. If the response contains N [ResultSet][google.spanner.v1.ResultSet] messages, then statement N+1 in the request failed.

Example 1:

  • Request: 5 DML statements, all executed successfully.
  • Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the status OK.

Example 2:

  • Request: 5 DML statements. The third statement has a syntax error.
  • Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax error (INVALID_ARGUMENT) status. The number of [ResultSet][google.spanner.v1.ResultSet] messages indicates that the third statement failed, and the fourth and fifth statements were not executed.

Value parameters

resultSets

One [ResultSet][google.spanner.v1.ResultSet] for each statement in the request that ran successfully, in the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] does not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] contain the number of rows modified by the statement. Only the first [ResultSet][google.spanner.v1.ResultSet] in the response contains valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].

status

If all DML statements are executed successfully, the status is OK. Otherwise, the error status of the first failed statement.

Attributes

Companion
object
Source
ExecuteBatchDmlResponse.scala
Supertypes
trait Updatable[ExecuteBatchDmlResponse]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ExecuteBatchDmlResponse extends GeneratedMessageCompanion[ExecuteBatchDmlResponse]

Attributes

Companion
class
Source
ExecuteBatchDmlResponse.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ExecuteBatchDmlResponse]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ExecuteSqlRequest(session: String, transaction: Option[TransactionSelector], sql: String, params: Option[Struct], paramTypes: Map[String, Type], resumeToken: ByteString, queryMode: QueryMode, partitionToken: ByteString, seqno: Long, queryOptions: Option[QueryOptions], requestOptions: Option[RequestOptions], dataBoostEnabled: Boolean, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ExecuteSqlRequest]

The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].

The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].

Value parameters

dataBoostEnabled

If this is for a partitioned query and this field is set to true, the request will be executed via Spanner independent compute resources. If the field is set to true but the request does not set partition_token, the API will return an INVALID_ARGUMENT error.

paramTypes

It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type BYTES and values of type STRING both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases, param_types can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.

params

Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the @ character followed by the parameter name (for example, @firstName). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: "WHERE id > @msg_id AND id < @msg_id + 100" It is an error to execute a SQL statement with unbound parameters.

partitionToken

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.

queryMode

Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats]. If [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only be set to [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL].

queryOptions

Query optimizer configuration to use for the given query.

requestOptions

Common options for this request.

resumeToken

If this request is resuming a previously interrupted SQL statement execution, resume_token should be copied from the last [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token.

seqno

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.

session

Required. The session in which the SQL query should be performed.

sql

Required. The SQL string.

transaction

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.

Attributes

Companion
object
Source
ExecuteSqlRequest.scala
Supertypes
trait Updatable[ExecuteSqlRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ExecuteSqlRequest extends GeneratedMessageCompanion[ExecuteSqlRequest]

Attributes

Companion
class
Source
ExecuteSqlRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ExecuteSqlRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class GetSessionRequest(name: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[GetSessionRequest]

The request for [GetSession][google.spanner.v1.Spanner.GetSession].

The request for [GetSession][google.spanner.v1.Spanner.GetSession].

Value parameters

name

Required. The name of the session to retrieve.

Attributes

Companion
object
Source
GetSessionRequest.scala
Supertypes
trait Updatable[GetSessionRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object GetSessionRequest extends GeneratedMessageCompanion[GetSessionRequest]

Attributes

Companion
class
Source
GetSessionRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[GetSessionRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ListSessionsRequest(database: String, pageSize: Int, pageToken: String, filter: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ListSessionsRequest]

The request for [ListSessions][google.spanner.v1.Spanner.ListSessions].

The request for [ListSessions][google.spanner.v1.Spanner.ListSessions].

Value parameters

database

Required. The database in which to list sessions.

filter

An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are:

  • labels.key where key is the name of a label Some examples of using filters are:
  • labels.env:* --> The session has the label "env".
  • labels.env:dev --> The session has the label "env" and the value of the label contains the string "dev".
pageSize

Number of sessions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

pageToken

If non-empty, page_token should contain a [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token] from a previous [ListSessionsResponse][google.spanner.v1.ListSessionsResponse].

Attributes

Companion
object
Source
ListSessionsRequest.scala
Supertypes
trait Updatable[ListSessionsRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ListSessionsRequest extends GeneratedMessageCompanion[ListSessionsRequest]

Attributes

Companion
class
Source
ListSessionsRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ListSessionsRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ListSessionsResponse(sessions: Seq[Session], nextPageToken: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ListSessionsResponse]

The response for [ListSessions][google.spanner.v1.Spanner.ListSessions].

The response for [ListSessions][google.spanner.v1.Spanner.ListSessions].

Value parameters

nextPageToken

next_page_token can be sent in a subsequent [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more of the matching sessions.

sessions

The list of requested sessions.

Attributes

Companion
object
Source
ListSessionsResponse.scala
Supertypes
trait Updatable[ListSessionsResponse]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ListSessionsResponse extends GeneratedMessageCompanion[ListSessionsResponse]

Attributes

Companion
class
Source
ListSessionsResponse.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ListSessionsResponse]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class Partition(partitionToken: ByteString, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Partition]

Information returned for each partition returned in a PartitionResponse.

Information returned for each partition returned in a PartitionResponse.

Value parameters

partitionToken

This token can be passed to Read, StreamingRead, ExecuteSql, or ExecuteStreamingSql requests to restrict the results to those identified by this partition token.

Attributes

Companion
object
Source
Partition.scala
Supertypes
trait Updatable[Partition]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Partition extends GeneratedMessageCompanion[Partition]

Attributes

Companion
class
Source
Partition.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Partition]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Partition.type
final case class PartitionOptions(partitionSizeBytes: Long, maxPartitions: Long, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[PartitionOptions]

Options for a PartitionQueryRequest and PartitionReadRequest.

Options for a PartitionQueryRequest and PartitionReadRequest.

Value parameters

maxPartitions

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.

partitionSizeBytes

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.

Attributes

Companion
object
Source
PartitionOptions.scala
Supertypes
trait Updatable[PartitionOptions]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PartitionOptions extends GeneratedMessageCompanion[PartitionOptions]

Attributes

Companion
class
Source
PartitionOptions.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[PartitionOptions]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class PartitionQueryRequest(session: String, transaction: Option[TransactionSelector], sql: String, params: Option[Struct], paramTypes: Map[String, Type], partitionOptions: Option[PartitionOptions], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[PartitionQueryRequest]

The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery]

The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery]

Value parameters

paramTypes

It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type BYTES and values of type STRING both appear in [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. In these cases, param_types can be used to specify the exact SQL type for some or all of the SQL query parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.

params

Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the @ character followed by the parameter name (for example, @firstName). Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: "WHERE id > @msg_id AND id < @msg_id + 100" It is an error to execute a SQL statement with unbound parameters.

partitionOptions

Additional options that affect how many partitions are created.

session

Required. The session used to create the partitions.

sql

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][google.spanner.v1.Spanner.ExecuteStreamingSql] with a PartitionedDml transaction for large, partition-friendly DML operations.

transaction

Read only snapshot transactions are supported, read/write and single use transactions are not.

Attributes

Companion
object
Source
PartitionQueryRequest.scala
Supertypes
trait Updatable[PartitionQueryRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PartitionQueryRequest extends GeneratedMessageCompanion[PartitionQueryRequest]

Attributes

Companion
class
Source
PartitionQueryRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[PartitionQueryRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class PartitionReadRequest(session: String, transaction: Option[TransactionSelector], table: String, index: String, columns: Seq[String], keySet: Option[KeySet], partitionOptions: Option[PartitionOptions], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[PartitionReadRequest]

The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead]

The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead]

Value parameters

columns

The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be returned for each row matching this request.

index

If non-empty, the name of an index on [table][google.spanner.v1.PartitionReadRequest.table]. This index is used instead of the table primary key when interpreting [key_set][google.spanner.v1.PartitionReadRequest.key_set] and sorting result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set] for further information.

keySet

Required. key_set identifies the rows to be yielded. key_set names the primary keys of the rows in [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless [index][google.spanner.v1.PartitionReadRequest.index] is present. If [index][google.spanner.v1.PartitionReadRequest.index] is present, then [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names index keys in [index][google.spanner.v1.PartitionReadRequest.index]. It is not an error for the key_set to name rows that do not exist in the database. Read yields nothing for nonexistent rows.

partitionOptions

Additional options that affect how many partitions are created.

session

Required. The session used to create the partitions.

table

Required. The name of the table in the database to be read.

transaction

Read only snapshot transactions are supported, read/write and single use transactions are not.

Attributes

Companion
object
Source
PartitionReadRequest.scala
Supertypes
trait Updatable[PartitionReadRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PartitionReadRequest extends GeneratedMessageCompanion[PartitionReadRequest]

Attributes

Companion
class
Source
PartitionReadRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[PartitionReadRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class PartitionResponse(partitions: Seq[Partition], transaction: Option[Transaction], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[PartitionResponse]

The response for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] or [PartitionRead][google.spanner.v1.Spanner.PartitionRead]

The response for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] or [PartitionRead][google.spanner.v1.Spanner.PartitionRead]

Value parameters

partitions

Partitions created by this request.

transaction

Transaction created by this request.

Attributes

Companion
object
Source
PartitionResponse.scala
Supertypes
trait Updatable[PartitionResponse]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PartitionResponse extends GeneratedMessageCompanion[PartitionResponse]

Attributes

Companion
class
Source
PartitionResponse.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[PartitionResponse]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ReadRequest(session: String, transaction: Option[TransactionSelector], table: String, index: String, columns: Seq[String], keySet: Option[KeySet], limit: Long, resumeToken: ByteString, partitionToken: ByteString, requestOptions: Option[RequestOptions], dataBoostEnabled: Boolean, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ReadRequest]

The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead].

The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead].

Value parameters

columns

Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.

dataBoostEnabled

If this is for a partitioned read and this field is set to true, the request will be executed via Spanner independent compute resources. If the field is set to true but the request does not set partition_token, the API will return an INVALID_ARGUMENT error.

index

If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table]. This index is used instead of the table primary key when interpreting [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows. See [key_set][google.spanner.v1.ReadRequest.key_set] for further information.

keySet

Required. key_set identifies the rows to be yielded. key_set names the primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys in [index][google.spanner.v1.ReadRequest.index]. If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is empty, rows are yielded in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty) or index key order (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is not empty, rows will be yielded in an unspecified order. It is not an error for the key_set to name rows that do not exist in the database. Read yields nothing for nonexistent rows.

limit

If greater than zero, only the first limit rows are yielded. If limit is zero, the default is no limit. A limit cannot be specified if partition_token is set.

partitionToken

If present, results will be restricted to the specified partition previously created using PartitionRead(). There must be an exact match for the values of fields common to this message and the PartitionReadRequest message used to create this partition_token.

requestOptions

Common options for this request.

resumeToken

If this request is resuming a previously interrupted read, resume_token should be copied from the last [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this enables the new read to resume where the last read left off. The rest of the request parameters must exactly match the request that yielded this token.

session

Required. The session in which the read should be performed.

table

Required. The name of the table in the database to be read.

transaction

The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.

Attributes

Companion
object
Source
ReadRequest.scala
Supertypes
trait Updatable[ReadRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ReadRequest extends GeneratedMessageCompanion[ReadRequest]

Attributes

Companion
class
Source
ReadRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ReadRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class RequestOptions(priority: Priority, requestTag: String, transactionTag: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[RequestOptions]

Common request options for various APIs.

Common request options for various APIs.

Value parameters

priority

Priority for the request.

requestTag

A per-request tag which can be applied to queries or reads, used for statistics collection. Both request_tag and transaction_tag can be specified for a read or query that belongs to a transaction. This field is ignored for requests where it's not applicable (e.g. CommitRequest). Legal characters for request_tag values are all printable characters (ASCII 32 - 126) and the length of a request_tag is limited to 50 characters. Values that exceed this limit are truncated. Any leading underscore (_) characters will be removed from the string.

transactionTag

A tag used for statistics collection about this transaction. Both request_tag and transaction_tag can be specified for a read or query that belongs to a transaction. The value of transaction_tag should be the same for all requests belonging to the same transaction. If this request doesn't belong to any transaction, transaction_tag will be ignored. Legal characters for transaction_tag values are all printable characters (ASCII 32 - 126) and the length of a transaction_tag is limited to 50 characters. Values that exceed this limit are truncated. Any leading underscore (_) characters will be removed from the string.

Attributes

Companion
object
Source
RequestOptions.scala
Supertypes
trait Updatable[RequestOptions]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RequestOptions extends GeneratedMessageCompanion[RequestOptions]

Attributes

Companion
class
Source
RequestOptions.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[RequestOptions]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class RollbackRequest(session: String, transactionId: ByteString, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[RollbackRequest]

The request for [Rollback][google.spanner.v1.Spanner.Rollback].

The request for [Rollback][google.spanner.v1.Spanner.Rollback].

Value parameters

session

Required. The session in which the transaction to roll back is running.

transactionId

Required. The transaction to roll back.

Attributes

Companion
object
Source
RollbackRequest.scala
Supertypes
trait Updatable[RollbackRequest]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RollbackRequest extends GeneratedMessageCompanion[RollbackRequest]

Attributes

Companion
class
Source
RollbackRequest.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[RollbackRequest]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class Session(name: String, labels: Map[String, String], createTime: Option[Timestamp], approximateLastUseTime: Option[Timestamp], creatorRole: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Session]

A session in the Cloud Spanner API.

A session in the Cloud Spanner API.

Value parameters

approximateLastUseTime

Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.

createTime

Output only. The timestamp when the session is created.

creatorRole

The database role which created this session.

labels

The labels for the session.

  • Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])?.
  • Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?.
  • No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.
name

Output only. The name of the session. This is always system-assigned.

Attributes

Companion
object
Source
Session.scala
Supertypes
trait Updatable[Session]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Session extends GeneratedMessageCompanion[Session]

Attributes

Companion
class
Source
Session.scala
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Session]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Session.type
trait Spanner[F[_]]

Cloud Spanner API

Cloud Spanner API

The Cloud Spanner API can be used to manage sessions and execute transactions on data stored in Cloud Spanner databases.

Attributes

Companion
object
Source
Spanner.scala
Supertypes
class Object
trait Matchable
class Any
object Spanner

Attributes

Companion
trait
Source
Spanner.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Spanner.type
object SpannerProto extends GeneratedFileObject

Attributes

Source
SpannerProto.scala
Supertypes
class GeneratedFileObject
class Object
trait Matchable
class Any
Self type