ExecuteBatchDmlResponse

com.google.spanner.v1.spanner.ExecuteBatchDmlResponse
See theExecuteBatchDmlResponse companion object
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.

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
Graph
Supertypes
trait Updatable[ExecuteBatchDmlResponse]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def getField(`__field`: FieldDescriptor): PValue

Attributes

Source
ExecuteBatchDmlResponse.scala
def getFieldByNumber(`__fieldNumber`: Int): Any

Attributes

Source
ExecuteBatchDmlResponse.scala
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
Source
ExecuteBatchDmlResponse.scala
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

Source
ExecuteBatchDmlResponse.scala
def withUnknownFields(`__v`: UnknownFieldSet): ExecuteBatchDmlResponse

Attributes

Source
ExecuteBatchDmlResponse.scala
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Source
ExecuteBatchDmlResponse.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala

Attributes

Inherited from:
Updatable
Source
Lenses.scala
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala