public final class ExecuteBatchDmlResponse extends com.google.protobuf.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].
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
RESULT_SETS_FIELD_NUMBER |
static int |
STATUS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static ExecuteBatchDmlResponse |
getDefaultInstance() |
ExecuteBatchDmlResponse |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.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`.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasStatus()
If all DML statements are executed successfully, the status is `OK`.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ExecuteBatchDmlResponse.Builder |
newBuilder() |
static ExecuteBatchDmlResponse.Builder |
newBuilder(ExecuteBatchDmlResponse prototype) |
ExecuteBatchDmlResponse.Builder |
newBuilderForType() |
protected ExecuteBatchDmlResponse.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static ExecuteBatchDmlResponse |
parseDelimitedFrom(InputStream input) |
static ExecuteBatchDmlResponse |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(byte[] data) |
static ExecuteBatchDmlResponse |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(ByteBuffer data) |
static ExecuteBatchDmlResponse |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(com.google.protobuf.ByteString data) |
static ExecuteBatchDmlResponse |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ExecuteBatchDmlResponse |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteBatchDmlResponse |
parseFrom(InputStream input) |
static ExecuteBatchDmlResponse |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ExecuteBatchDmlResponse> |
parser() |
ExecuteBatchDmlResponse.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int RESULT_SETS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic 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 ExecuteBatchDmlResponseOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static ExecuteBatchDmlResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteBatchDmlResponse parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteBatchDmlResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteBatchDmlResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteBatchDmlResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteBatchDmlResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteBatchDmlResponse parseFrom(InputStream input) throws IOException
IOExceptionpublic static ExecuteBatchDmlResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ExecuteBatchDmlResponse parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ExecuteBatchDmlResponse parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ExecuteBatchDmlResponse parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ExecuteBatchDmlResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ExecuteBatchDmlResponse.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ExecuteBatchDmlResponse.Builder newBuilder()
public static ExecuteBatchDmlResponse.Builder newBuilder(ExecuteBatchDmlResponse prototype)
public ExecuteBatchDmlResponse.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ExecuteBatchDmlResponse.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ExecuteBatchDmlResponse getDefaultInstance()
public static com.google.protobuf.Parser<ExecuteBatchDmlResponse> parser()
public com.google.protobuf.Parser<ExecuteBatchDmlResponse> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ExecuteBatchDmlResponse getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2021 Google LLC. All rights reserved.