Class SpannerActionOutcome (6.56.0)

public final class SpannerActionOutcome extends GeneratedMessageV3 implements SpannerActionOutcomeOrBuilder

SpannerActionOutcome defines a result of execution of a single SpannerAction.

Protobuf type google.spanner.executor.v1.SpannerActionOutcome

Static Fields

ADMIN_RESULT_FIELD_NUMBER

public static final int ADMIN_RESULT_FIELD_NUMBER
Field Value
TypeDescription
int

BATCH_TXN_ID_FIELD_NUMBER

public static final int BATCH_TXN_ID_FIELD_NUMBER
Field Value
TypeDescription
int

CHANGE_STREAM_RECORDS_FIELD_NUMBER

public static final int CHANGE_STREAM_RECORDS_FIELD_NUMBER
Field Value
TypeDescription
int

COMMIT_TIME_FIELD_NUMBER

public static final int COMMIT_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DB_PARTITION_FIELD_NUMBER

public static final int DB_PARTITION_FIELD_NUMBER
Field Value
TypeDescription
int

DML_ROWS_MODIFIED_FIELD_NUMBER

public static final int DML_ROWS_MODIFIED_FIELD_NUMBER
Field Value
TypeDescription
int

QUERY_RESULT_FIELD_NUMBER

public static final int QUERY_RESULT_FIELD_NUMBER
Field Value
TypeDescription
int

READ_RESULT_FIELD_NUMBER

public static final int READ_RESULT_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSACTION_RESTARTED_FIELD_NUMBER

public static final int TRANSACTION_RESTARTED_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SpannerActionOutcome getDefaultInstance()
Returns
TypeDescription
SpannerActionOutcome

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SpannerActionOutcome.Builder newBuilder()
Returns
TypeDescription
SpannerActionOutcome.Builder

newBuilder(SpannerActionOutcome prototype)

public static SpannerActionOutcome.Builder newBuilder(SpannerActionOutcome prototype)
Parameter
NameDescription
prototypeSpannerActionOutcome
Returns
TypeDescription
SpannerActionOutcome.Builder

parseDelimitedFrom(InputStream input)

public static SpannerActionOutcome parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SpannerActionOutcome parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SpannerActionOutcome parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SpannerActionOutcome parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SpannerActionOutcome parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SpannerActionOutcome parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SpannerActionOutcome parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SpannerActionOutcome parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SpannerActionOutcome parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SpannerActionOutcome parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SpannerActionOutcome parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SpannerActionOutcome parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpannerActionOutcome
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SpannerActionOutcome> parser()
Returns
TypeDescription
Parser<SpannerActionOutcome>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAdminResult()

public AdminResult getAdminResult()

Result of admin related actions.

optional .google.spanner.executor.v1.AdminResult admin_result = 8;

Returns
TypeDescription
AdminResult

The adminResult.

getAdminResultOrBuilder()

public AdminResultOrBuilder getAdminResultOrBuilder()

Result of admin related actions.

optional .google.spanner.executor.v1.AdminResult admin_result = 8;

Returns
TypeDescription
AdminResultOrBuilder

getBatchTxnId()

public ByteString getBatchTxnId()

In successful StartBatchTransactionAction outcomes, this contains the ID of the transaction.

optional bytes batch_txn_id = 6;

Returns
TypeDescription
ByteString

The batchTxnId.

getChangeStreamRecords(int index)

public ChangeStreamRecord getChangeStreamRecords(int index)

Change stream records returned by a change stream query.

repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
ChangeStreamRecord

getChangeStreamRecordsCount()

public int getChangeStreamRecordsCount()

Change stream records returned by a change stream query.

repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10;

Returns
TypeDescription
int

getChangeStreamRecordsList()

public List<ChangeStreamRecord> getChangeStreamRecordsList()

Change stream records returned by a change stream query.

repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10;

Returns
TypeDescription
List<ChangeStreamRecord>

getChangeStreamRecordsOrBuilder(int index)

public ChangeStreamRecordOrBuilder getChangeStreamRecordsOrBuilder(int index)

Change stream records returned by a change stream query.

repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
ChangeStreamRecordOrBuilder

getChangeStreamRecordsOrBuilderList()

public List<? extends ChangeStreamRecordOrBuilder> getChangeStreamRecordsOrBuilderList()

Change stream records returned by a change stream query.

repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10;

Returns
TypeDescription
List<? extends com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder>

getCommitTime()

public Timestamp getCommitTime()

Transaction timestamp. It must be set for successful committed actions.

optional .google.protobuf.Timestamp commit_time = 2;

Returns
TypeDescription
Timestamp

The commitTime.

getCommitTimeOrBuilder()

public TimestampOrBuilder getCommitTimeOrBuilder()

Transaction timestamp. It must be set for successful committed actions.

optional .google.protobuf.Timestamp commit_time = 2;

Returns
TypeDescription
TimestampOrBuilder

getDbPartition(int index)

public BatchPartition getDbPartition(int index)

Generated database partitions (result of a GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).

repeated .google.spanner.executor.v1.BatchPartition db_partition = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
BatchPartition

getDbPartitionCount()

public int getDbPartitionCount()

Generated database partitions (result of a GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).

repeated .google.spanner.executor.v1.BatchPartition db_partition = 7;

Returns
TypeDescription
int

getDbPartitionList()

public List<BatchPartition> getDbPartitionList()

Generated database partitions (result of a GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).

repeated .google.spanner.executor.v1.BatchPartition db_partition = 7;

Returns
TypeDescription
List<BatchPartition>

getDbPartitionOrBuilder(int index)

public BatchPartitionOrBuilder getDbPartitionOrBuilder(int index)

Generated database partitions (result of a GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).

repeated .google.spanner.executor.v1.BatchPartition db_partition = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
BatchPartitionOrBuilder

getDbPartitionOrBuilderList()

public List<? extends BatchPartitionOrBuilder> getDbPartitionOrBuilderList()

Generated database partitions (result of a GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).

repeated .google.spanner.executor.v1.BatchPartition db_partition = 7;

Returns
TypeDescription
List<? extends com.google.spanner.executor.v1.BatchPartitionOrBuilder>

getDefaultInstanceForType()

public SpannerActionOutcome getDefaultInstanceForType()
Returns
TypeDescription
SpannerActionOutcome

getDmlRowsModified(int index)

public long getDmlRowsModified(int index)

Stores rows modified by query in single DML or batch DML action. In case of batch DML action, stores 0 as row count of errored DML query.

repeated int64 dml_rows_modified = 9;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The dmlRowsModified at the given index.

getDmlRowsModifiedCount()

public int getDmlRowsModifiedCount()

Stores rows modified by query in single DML or batch DML action. In case of batch DML action, stores 0 as row count of errored DML query.

repeated int64 dml_rows_modified = 9;

Returns
TypeDescription
int

The count of dmlRowsModified.

getDmlRowsModifiedList()

public List<Long> getDmlRowsModifiedList()

Stores rows modified by query in single DML or batch DML action. In case of batch DML action, stores 0 as row count of errored DML query.

repeated int64 dml_rows_modified = 9;

Returns
TypeDescription
List<Long>

A list containing the dmlRowsModified.

getParserForType()

public Parser<SpannerActionOutcome> getParserForType()
Returns
TypeDescription
Parser<SpannerActionOutcome>
Overrides

getQueryResult()

public QueryResult getQueryResult()

Result of a Query. This field must be set for Queries even if no rows were read.

optional .google.spanner.executor.v1.QueryResult query_result = 4;

Returns
TypeDescription
QueryResult

The queryResult.

getQueryResultOrBuilder()

public QueryResultOrBuilder getQueryResultOrBuilder()

Result of a Query. This field must be set for Queries even if no rows were read.

optional .google.spanner.executor.v1.QueryResult query_result = 4;

Returns
TypeDescription
QueryResultOrBuilder

getReadResult()

public ReadResult getReadResult()

Result of a ReadAction. This field must be set for ReadActions even if no rows were read.

optional .google.spanner.executor.v1.ReadResult read_result = 3;

Returns
TypeDescription
ReadResult

The readResult.

getReadResultOrBuilder()

public ReadResultOrBuilder getReadResultOrBuilder()

Result of a ReadAction. This field must be set for ReadActions even if no rows were read.

optional .google.spanner.executor.v1.ReadResult read_result = 3;

Returns
TypeDescription
ReadResultOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStatus()

public Status getStatus()

If an outcome is split into multiple parts, status will be set only in the last part.

optional .google.rpc.Status status = 1;

Returns
TypeDescription
com.google.rpc.Status

The status.

getStatusOrBuilder()

public StatusOrBuilder getStatusOrBuilder()

If an outcome is split into multiple parts, status will be set only in the last part.

optional .google.rpc.Status status = 1;

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getTransactionRestarted()

public boolean getTransactionRestarted()

This bit indicates that Spanner has restarted the current transaction. It means that the client should replay all the reads and writes. Setting it to true is only valid in the context of a read-write transaction, as an outcome of a committing FinishTransactionAction.

optional bool transaction_restarted = 5;

Returns
TypeDescription
boolean

The transactionRestarted.

hasAdminResult()

public boolean hasAdminResult()

Result of admin related actions.

optional .google.spanner.executor.v1.AdminResult admin_result = 8;

Returns
TypeDescription
boolean

Whether the adminResult field is set.

hasBatchTxnId()

public boolean hasBatchTxnId()

In successful StartBatchTransactionAction outcomes, this contains the ID of the transaction.

optional bytes batch_txn_id = 6;

Returns
TypeDescription
boolean

Whether the batchTxnId field is set.

hasCommitTime()

public boolean hasCommitTime()

Transaction timestamp. It must be set for successful committed actions.

optional .google.protobuf.Timestamp commit_time = 2;

Returns
TypeDescription
boolean

Whether the commitTime field is set.

hasQueryResult()

public boolean hasQueryResult()

Result of a Query. This field must be set for Queries even if no rows were read.

optional .google.spanner.executor.v1.QueryResult query_result = 4;

Returns
TypeDescription
boolean

Whether the queryResult field is set.

hasReadResult()

public boolean hasReadResult()

Result of a ReadAction. This field must be set for ReadActions even if no rows were read.

optional .google.spanner.executor.v1.ReadResult read_result = 3;

Returns
TypeDescription
boolean

Whether the readResult field is set.

hasStatus()

public boolean hasStatus()

If an outcome is split into multiple parts, status will be set only in the last part.

optional .google.rpc.Status status = 1;

Returns
TypeDescription
boolean

Whether the status field is set.

hasTransactionRestarted()

public boolean hasTransactionRestarted()

This bit indicates that Spanner has restarted the current transaction. It means that the client should replay all the reads and writes. Setting it to true is only valid in the context of a read-write transaction, as an outcome of a committing FinishTransactionAction.

optional bool transaction_restarted = 5;

Returns
TypeDescription
boolean

Whether the transactionRestarted field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SpannerActionOutcome.Builder newBuilderForType()
Returns
TypeDescription
SpannerActionOutcome.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SpannerActionOutcome.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SpannerActionOutcome.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SpannerActionOutcome.Builder toBuilder()
Returns
TypeDescription
SpannerActionOutcome.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException