final case class ExecuteSqlRequest(session: String = "", transaction: Option[TransactionSelector] = _root_.scala.None, sql: String = "", params: Option[Struct] = _root_.scala.None, paramTypes: Map[String, Type] = ..., resumeToken: ByteString = ..., queryMode: QueryMode = ..., partitionToken: ByteString = ..., seqno: Long = 0L, queryOptions: Option[QueryOptions] = _root_.scala.None, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[ExecuteSqlRequest] with Product with Serializable
The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
- session
Required. The session in which the SQL query should be performed.
- 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.
- sql
Required. The SQL string.
- 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.- paramTypes
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type
BYTESand values of typeSTRINGboth appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases,param_typescan 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.- resumeToken
If this request is resuming a previously interrupted SQL statement execution,
resume_tokenshould 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.- 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].
- 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.
- 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.
- queryOptions
Query optimizer configuration to use for the given query.
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- ExecuteSqlRequest
- Product
- Equals
- Updatable
- GeneratedMessage
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ExecuteSqlRequest(session: String = "", transaction: Option[TransactionSelector] = _root_.scala.None, sql: String = "", params: Option[Struct] = _root_.scala.None, paramTypes: Map[String, Type] = ..., resumeToken: ByteString = ..., queryMode: QueryMode = ..., partitionToken: ByteString = ..., seqno: Long = 0L, queryOptions: Option[QueryOptions] = _root_.scala.None, unknownFields: UnknownFieldSet = ...)
- session
Required. The session in which the SQL query should be performed.
- 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.
- sql
Required. The SQL string.
- 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.- paramTypes
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type
BYTESand values of typeSTRINGboth appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases,param_typescan 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.- resumeToken
If this request is resuming a previously interrupted SQL statement execution,
resume_tokenshould 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.- 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].
- 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.
- 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.
- queryOptions
Query optimizer configuration to use for the given query.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllParamTypes(__vs: Iterable[(String, Type)]): ExecuteSqlRequest
- def addParamTypes(__vs: (String, Type)*): ExecuteSqlRequest
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearParamTypes: ExecuteSqlRequest
- def clearParams: ExecuteSqlRequest
- def clearQueryOptions: ExecuteSqlRequest
- def clearTransaction: ExecuteSqlRequest
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
companion: ExecuteSqlRequest.type
- Definition Classes
- ExecuteSqlRequest → GeneratedMessage
- def discardUnknownFields: ExecuteSqlRequest
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- ExecuteSqlRequest → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- ExecuteSqlRequest → GeneratedMessage
- def getParams: Struct
- def getQueryOptions: QueryOptions
- def getTransaction: TransactionSelector
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val paramTypes: Map[String, Type]
- val params: Option[Struct]
- val partitionToken: ByteString
- val queryMode: QueryMode
- val queryOptions: Option[QueryOptions]
- val resumeToken: ByteString
- val seqno: Long
-
def
serializedSize: Int
- Definition Classes
- ExecuteSqlRequest → GeneratedMessage
- val session: String
- val sql: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
-
final
def
toByteString: ByteString
- Definition Classes
- GeneratedMessage
-
final
def
toPMessage: PMessage
- Definition Classes
- GeneratedMessage
-
def
toProtoString: String
- Definition Classes
- ExecuteSqlRequest → GeneratedMessage
- val transaction: Option[TransactionSelector]
- val unknownFields: UnknownFieldSet
-
def
update(ms: (Lens[ExecuteSqlRequest, ExecuteSqlRequest]) ⇒ scalapb.lenses.Mutation[ExecuteSqlRequest]*): ExecuteSqlRequest
- Definition Classes
- Updatable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def withParamTypes(__v: Map[String, Type]): ExecuteSqlRequest
- def withParams(__v: Struct): ExecuteSqlRequest
- def withPartitionToken(__v: ByteString): ExecuteSqlRequest
- def withQueryMode(__v: QueryMode): ExecuteSqlRequest
- def withQueryOptions(__v: QueryOptions): ExecuteSqlRequest
- def withResumeToken(__v: ByteString): ExecuteSqlRequest
- def withSeqno(__v: Long): ExecuteSqlRequest
- def withSession(__v: String): ExecuteSqlRequest
- def withSql(__v: String): ExecuteSqlRequest
- def withTransaction(__v: TransactionSelector): ExecuteSqlRequest
- def withUnknownFields(__v: UnknownFieldSet): ExecuteSqlRequest
-
final
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- ExecuteSqlRequest → GeneratedMessage
-
final
def
writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage