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], one for each DML statement that has successfully executed.
If a statement fails, the error is returned as part of the response payload.
Clients can determine whether all DML statements have run successfully, or if
a statement failed, using one of the following approaches:
1. Check if 'status' field is OkStatus.
2. Check if result_sets_size() equals the number of statements in
[ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest].
Example 1: A request with 5 DML statements, all executed successfully.
Result: A response with 5 ResultSets, one for each statement in the same
order, and an OK status.
Example 2: A request with 5 DML statements. The 3rd statement has a syntax
error.
Result: A response with 2 ResultSets, for the first 2 statements that
run successfully, and a syntax error (INVALID_ARGUMENT) status. From
result_set_size() client can determine that the 3rd statement has failed.
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)
ResultSets, one for each statement in the request that ran successfully, in
the same order as the statements in the request.
|
int |
getResultSetsCount()
ResultSets, one for each statement in the request that ran successfully, in
the same order as the statements in the request.
|
List<ResultSet> |
getResultSetsList()
ResultSets, one for each statement in the request that ran successfully, in
the same order as the statements in the request.
|
ResultSetOrBuilder |
getResultSetsOrBuilder(int index)
ResultSets, one for each statement in the request that ran successfully, in
the same order as the statements in the request.
|
List<? extends ResultSetOrBuilder> |
getResultSetsOrBuilderList()
ResultSets, one 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, status will be OK.
|
com.google.rpc.StatusOrBuilder |
getStatusOrBuilder()
If all DML statements are executed successfully, status will be OK.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasStatus()
If all DML statements are executed successfully, status will be 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) |
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, newInstance, 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
public 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()
ResultSets, one 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] will not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows modified by the statement. Only the first ResultSet in the response contains a valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
repeated .google.spanner.v1.ResultSet result_sets = 1;getResultSetsList in interface ExecuteBatchDmlResponseOrBuilderpublic List<? extends ResultSetOrBuilder> getResultSetsOrBuilderList()
ResultSets, one 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] will not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows modified by the statement. Only the first ResultSet in the response contains a valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
repeated .google.spanner.v1.ResultSet result_sets = 1;getResultSetsOrBuilderList in interface ExecuteBatchDmlResponseOrBuilderpublic int getResultSetsCount()
ResultSets, one 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] will not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows modified by the statement. Only the first ResultSet in the response contains a valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
repeated .google.spanner.v1.ResultSet result_sets = 1;getResultSetsCount in interface ExecuteBatchDmlResponseOrBuilderpublic ResultSet getResultSets(int index)
ResultSets, one 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] will not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows modified by the statement. Only the first ResultSet in the response contains a valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
repeated .google.spanner.v1.ResultSet result_sets = 1;getResultSets in interface ExecuteBatchDmlResponseOrBuilderpublic ResultSetOrBuilder getResultSetsOrBuilder(int index)
ResultSets, one 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] will not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows modified by the statement. Only the first ResultSet in the response contains a 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, status will be 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, status will be 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, status will be 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 © 2019 Google LLC. All rights reserved.