final case class ExecuteBatchDmlResponse(resultSets: Seq[ResultSet] = _root_.scala.Seq.empty, status: Option[Status] = _root_.scala.None, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) extends GeneratedMessage with Updatable[ExecuteBatchDmlResponse] with Product with Serializable
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.
- 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.
- Annotations
- @SerialVersionUID()
- Source
- ExecuteBatchDmlResponse.scala
- Alphabetic
- By Inheritance
- ExecuteBatchDmlResponse
- Updatable
- GeneratedMessage
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ExecuteBatchDmlResponse(resultSets: Seq[ResultSet] = _root_.scala.Seq.empty, status: Option[Status] = _root_.scala.None, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)
- 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.
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 addAllResultSets(__vs: Iterable[ResultSet]): ExecuteBatchDmlResponse
- def addResultSets(__vs: ResultSet*): ExecuteBatchDmlResponse
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearResultSets: ExecuteBatchDmlResponse
- def clearStatus: ExecuteBatchDmlResponse
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def companion: ExecuteBatchDmlResponse.type
- Definition Classes
- ExecuteBatchDmlResponse → GeneratedMessage
- def discardUnknownFields: ExecuteBatchDmlResponse
- 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[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getField(__field: FieldDescriptor): PValue
- Definition Classes
- ExecuteBatchDmlResponse → GeneratedMessage
- def getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- ExecuteBatchDmlResponse → GeneratedMessage
- def getStatus: Status
- 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()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val resultSets: Seq[ResultSet]
- def serializedSize: Int
- Definition Classes
- ExecuteBatchDmlResponse → GeneratedMessage
- val status: Option[Status]
- 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
- ExecuteBatchDmlResponse → GeneratedMessage
- val unknownFields: UnknownFieldSet
- def update(ms: (Lens[ExecuteBatchDmlResponse, ExecuteBatchDmlResponse]) => Mutation[ExecuteBatchDmlResponse]*): ExecuteBatchDmlResponse
- Definition Classes
- Updatable
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withResultSets(__v: Seq[ResultSet]): ExecuteBatchDmlResponse
- def withStatus(__v: Status): ExecuteBatchDmlResponse
- def withUnknownFields(__v: UnknownFieldSet): ExecuteBatchDmlResponse
- final def writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
- def writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- ExecuteBatchDmlResponse → GeneratedMessage
- final def writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage