final case class ExecuteSqlRequest(session: String = "", transaction: Option[TransactionSelector] = _root_.scala.None, sql: String = "", params: Option[Struct] = _root_.scala.None, paramTypes: Map[String, Type] = _root_.scala.collection.immutable.Map.empty, resumeToken: ByteString = _root_.com.google.protobuf.ByteString.EMPTY, queryMode: QueryMode = com.google.spanner.v1.spanner.ExecuteSqlRequest.QueryMode.NORMAL, partitionToken: ByteString = _root_.com.google.protobuf.ByteString.EMPTY, seqno: Long = 0L, queryOptions: Option[QueryOptions] = _root_.scala.None, requestOptions: Option[RequestOptions] = _root_.scala.None, directedReadOptions: Option[DirectedReadOptions] = _root_.scala.None, dataBoostEnabled: Boolean = false, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) 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 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.

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.

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.

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.

requestOptions

Common options for this request.

directedReadOptions

Directed read options for this request.

dataBoostEnabled

If this is for a partitioned query and this field is set to true, the request is executed with Spanner Data Boost independent compute resources. If the field is set to true but the request does not set partition_token, the API returns an INVALID_ARGUMENT error.

Annotations
@SerialVersionUID()
Source
ExecuteSqlRequest.scala
Linear Supertypes
Updatable[ExecuteSqlRequest], GeneratedMessage, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExecuteSqlRequest
  2. Updatable
  3. GeneratedMessage
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ExecuteSqlRequest(session: String = "", transaction: Option[TransactionSelector] = _root_.scala.None, sql: String = "", params: Option[Struct] = _root_.scala.None, paramTypes: Map[String, Type] = _root_.scala.collection.immutable.Map.empty, resumeToken: ByteString = _root_.com.google.protobuf.ByteString.EMPTY, queryMode: QueryMode = com.google.spanner.v1.spanner.ExecuteSqlRequest.QueryMode.NORMAL, partitionToken: ByteString = _root_.com.google.protobuf.ByteString.EMPTY, seqno: Long = 0L, queryOptions: Option[QueryOptions] = _root_.scala.None, requestOptions: Option[RequestOptions] = _root_.scala.None, directedReadOptions: Option[DirectedReadOptions] = _root_.scala.None, dataBoostEnabled: Boolean = false, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)

    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 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.

    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.

    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.

    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.

    requestOptions

    Common options for this request.

    directedReadOptions

    Directed read options for this request.

    dataBoostEnabled

    If this is for a partitioned query and this field is set to true, the request is executed with Spanner Data Boost independent compute resources. If the field is set to true but the request does not set partition_token, the API returns an INVALID_ARGUMENT error.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addAllParamTypes(__vs: Iterable[(String, Type)]): ExecuteSqlRequest
  5. def addParamTypes(__vs: (String, Type)*): ExecuteSqlRequest
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clearDirectedReadOptions: ExecuteSqlRequest
  8. def clearParamTypes: ExecuteSqlRequest
  9. def clearParams: ExecuteSqlRequest
  10. def clearQueryOptions: ExecuteSqlRequest
  11. def clearRequestOptions: ExecuteSqlRequest
  12. def clearTransaction: ExecuteSqlRequest
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. def companion: ExecuteSqlRequest.type
    Definition Classes
    ExecuteSqlRequest → GeneratedMessage
  15. val dataBoostEnabled: Boolean
  16. val directedReadOptions: Option[DirectedReadOptions]
  17. def discardUnknownFields: ExecuteSqlRequest
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def getDirectedReadOptions: DirectedReadOptions
  22. def getField(__field: FieldDescriptor): PValue
    Definition Classes
    ExecuteSqlRequest → GeneratedMessage
  23. def getFieldByNumber(__fieldNumber: Int): Any
    Definition Classes
    ExecuteSqlRequest → GeneratedMessage
  24. def getParams: Struct
  25. def getQueryOptions: QueryOptions
  26. def getRequestOptions: RequestOptions
  27. def getTransaction: TransactionSelector
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. val paramTypes: Map[String, Type]
  33. val params: Option[Struct]
  34. val partitionToken: ByteString
  35. def productElementNames: Iterator[String]
    Definition Classes
    Product
  36. val queryMode: QueryMode
  37. val queryOptions: Option[QueryOptions]
  38. val requestOptions: Option[RequestOptions]
  39. val resumeToken: ByteString
  40. val seqno: Long
  41. def serializedSize: Int
    Definition Classes
    ExecuteSqlRequest → GeneratedMessage
  42. val session: String
  43. val sql: String
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. final def toByteArray: Array[Byte]
    Definition Classes
    GeneratedMessage
  46. final def toByteString: ByteString
    Definition Classes
    GeneratedMessage
  47. final def toPMessage: PMessage
    Definition Classes
    GeneratedMessage
  48. def toProtoString: String
    Definition Classes
    ExecuteSqlRequest → GeneratedMessage
  49. val transaction: Option[TransactionSelector]
  50. val unknownFields: UnknownFieldSet
  51. def update(ms: (Lens[ExecuteSqlRequest, ExecuteSqlRequest]) => Mutation[ExecuteSqlRequest]*): ExecuteSqlRequest
    Definition Classes
    Updatable
  52. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  53. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  54. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  55. def withDataBoostEnabled(__v: Boolean): ExecuteSqlRequest
  56. def withDirectedReadOptions(__v: DirectedReadOptions): ExecuteSqlRequest
  57. def withParamTypes(__v: Map[String, Type]): ExecuteSqlRequest
  58. def withParams(__v: Struct): ExecuteSqlRequest
  59. def withPartitionToken(__v: ByteString): ExecuteSqlRequest
  60. def withQueryMode(__v: QueryMode): ExecuteSqlRequest
  61. def withQueryOptions(__v: QueryOptions): ExecuteSqlRequest
  62. def withRequestOptions(__v: RequestOptions): ExecuteSqlRequest
  63. def withResumeToken(__v: ByteString): ExecuteSqlRequest
  64. def withSeqno(__v: Long): ExecuteSqlRequest
  65. def withSession(__v: String): ExecuteSqlRequest
  66. def withSql(__v: String): ExecuteSqlRequest
  67. def withTransaction(__v: TransactionSelector): ExecuteSqlRequest
  68. def withUnknownFields(__v: UnknownFieldSet): ExecuteSqlRequest
  69. final def writeDelimitedTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage
  70. def writeTo(_output__: CodedOutputStream): Unit
    Definition Classes
    ExecuteSqlRequest → GeneratedMessage
  71. final def writeTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage

Inherited from Updatable[ExecuteSqlRequest]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped