public final class ExecuteBatchDmlResponse extends GeneratedMessageV3 implements ExecuteBatchDmlResponseOrBuilder
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.Protobuf type
google.spanner.v1.ExecuteBatchDmlResponse
Modifier and Type | Class and Description |
---|---|
static class |
ExecuteBatchDmlResponse.Builder
The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml].
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
RESULT_SETS_FIELD_NUMBER |
static int |
STATUS_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static ExecuteBatchDmlResponse |
getDefaultInstance() |
ExecuteBatchDmlResponse |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Parser<ExecuteBatchDmlResponse> |
getParserForType() |
ResultSet |
getResultSets(int index)
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.
|
int |
getResultSetsCount()
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.
|
List<ResultSet> |
getResultSetsList()
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.
|
ResultSetOrBuilder |
getResultSetsOrBuilder(int index)
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.
|
List<? extends ResultSetOrBuilder> |
getResultSetsOrBuilderList()
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.
|
int |
getSerializedSize() |
com.google.rpc.Status |
getStatus()
If all DML statements are executed successfully, the status is `OK`.
|
com.google.rpc.StatusOrBuilder |
getStatusOrBuilder()
If all DML statements are executed successfully, the status is `OK`.
|
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasStatus()
If all DML statements are executed successfully, the status is `OK`.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ExecuteBatchDmlResponse.Builder |
newBuilder() |
static ExecuteBatchDmlResponse.Builder |
newBuilder(ExecuteBatchDmlResponse prototype) |
ExecuteBatchDmlResponse.Builder |
newBuilderForType() |
protected ExecuteBatchDmlResponse.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) |
static ExecuteBatchDmlResponse |
parseDelimitedFrom(InputStream input) |
static ExecuteBatchDmlResponse |
parseDelimitedFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(byte[] data) |
static ExecuteBatchDmlResponse |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(ByteBuffer data) |
static ExecuteBatchDmlResponse |
parseFrom(ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(ByteString data) |
static ExecuteBatchDmlResponse |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(CodedInputStream input) |
static ExecuteBatchDmlResponse |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(InputStream input) |
static ExecuteBatchDmlResponse |
parseFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<ExecuteBatchDmlResponse> |
parser() |
ExecuteBatchDmlResponse.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int RESULT_SETS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public List<ResultSet> getResultSetsList()
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].
repeated .google.spanner.v1.ResultSet result_sets = 1;
getResultSetsList
in interface ExecuteBatchDmlResponseOrBuilder
public List<? extends ResultSetOrBuilder> getResultSetsOrBuilderList()
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].
repeated .google.spanner.v1.ResultSet result_sets = 1;
getResultSetsOrBuilderList
in interface ExecuteBatchDmlResponseOrBuilder
public int getResultSetsCount()
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].
repeated .google.spanner.v1.ResultSet result_sets = 1;
getResultSetsCount
in interface ExecuteBatchDmlResponseOrBuilder
public ResultSet getResultSets(int index)
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].
repeated .google.spanner.v1.ResultSet result_sets = 1;
getResultSets
in interface ExecuteBatchDmlResponseOrBuilder
public ResultSetOrBuilder getResultSetsOrBuilder(int index)
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].
repeated .google.spanner.v1.ResultSet result_sets = 1;
getResultSetsOrBuilder
in interface ExecuteBatchDmlResponseOrBuilder
public boolean hasStatus()
If all DML statements are executed successfully, the status is `OK`. Otherwise, the error status of the first failed statement.
.google.rpc.Status status = 2;
hasStatus
in interface ExecuteBatchDmlResponseOrBuilder
public com.google.rpc.Status getStatus()
If all DML statements are executed successfully, the status is `OK`. Otherwise, the error status of the first failed statement.
.google.rpc.Status status = 2;
getStatus
in interface ExecuteBatchDmlResponseOrBuilder
public com.google.rpc.StatusOrBuilder getStatusOrBuilder()
If all DML statements are executed successfully, the status is `OK`. Otherwise, the error status of the first failed statement.
.google.rpc.Status status = 2;
getStatusOrBuilder
in interface ExecuteBatchDmlResponseOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static ExecuteBatchDmlResponse parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ExecuteBatchDmlResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ExecuteBatchDmlResponse parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ExecuteBatchDmlResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ExecuteBatchDmlResponse parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ExecuteBatchDmlResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ExecuteBatchDmlResponse parseFrom(InputStream input) throws IOException
IOException
public static ExecuteBatchDmlResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ExecuteBatchDmlResponse parseDelimitedFrom(InputStream input) throws IOException
IOException
public static ExecuteBatchDmlResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ExecuteBatchDmlResponse parseFrom(CodedInputStream input) throws IOException
IOException
public static ExecuteBatchDmlResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public ExecuteBatchDmlResponse.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static ExecuteBatchDmlResponse.Builder newBuilder()
public static ExecuteBatchDmlResponse.Builder newBuilder(ExecuteBatchDmlResponse prototype)
public ExecuteBatchDmlResponse.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected ExecuteBatchDmlResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static ExecuteBatchDmlResponse getDefaultInstance()
public static Parser<ExecuteBatchDmlResponse> parser()
public Parser<ExecuteBatchDmlResponse> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public ExecuteBatchDmlResponse getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.