Class TransactionSelector

public final class TransactionSelector extends GeneratedMessageV3 implements TransactionSelectorOrBuilder

This message is used to select the transaction in which a Read or ExecuteSql call runs. See TransactionOptions for more information about transactions.

Protobuf type google.spanner.v1.TransactionSelector

Fields

BEGIN_FIELD_NUMBER

public static final int BEGIN_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

SINGLE_USE_FIELD_NUMBER

public static final int SINGLE_USE_FIELD_NUMBER
Field Value
TypeDescription
int

Methods

equals(Object obj)

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

getBegin()

public TransactionOptions getBegin()

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in ResultSetMetadata.transaction, which is a Transaction.

.google.spanner.v1.TransactionOptions begin = 3;

Returns
TypeDescription
TransactionOptions

The begin.

getBeginOrBuilder()

public TransactionOptionsOrBuilder getBeginOrBuilder()

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in ResultSetMetadata.transaction, which is a Transaction.

.google.spanner.v1.TransactionOptions begin = 3;

Returns
TypeDescription
TransactionOptionsOrBuilder

getDefaultInstance()

public static TransactionSelector getDefaultInstance()
Returns
TypeDescription
TransactionSelector

getDefaultInstanceForType()

public TransactionSelector getDefaultInstanceForType()
Returns
TypeDescription
TransactionSelector

getDescriptor()

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

getId()

public ByteString getId()

Execute the read or SQL query in a previously-started transaction.

bytes id = 2;

Returns
TypeDescription
ByteString

The id.

getParserForType()

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

getSelectorCase()

public TransactionSelector.SelectorCase getSelectorCase()
Returns
TypeDescription
TransactionSelector.SelectorCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSingleUse()

public TransactionOptions getSingleUse()

Execute the read or SQL query in a temporary transaction. This is the most efficient way to execute a transaction that consists of a single SQL query.

.google.spanner.v1.TransactionOptions single_use = 1;

Returns
TypeDescription
TransactionOptions

The singleUse.

getSingleUseOrBuilder()

public TransactionOptionsOrBuilder getSingleUseOrBuilder()

Execute the read or SQL query in a temporary transaction. This is the most efficient way to execute a transaction that consists of a single SQL query.

.google.spanner.v1.TransactionOptions single_use = 1;

Returns
TypeDescription
TransactionOptionsOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasBegin()

public boolean hasBegin()

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in ResultSetMetadata.transaction, which is a Transaction.

.google.spanner.v1.TransactionOptions begin = 3;

Returns
TypeDescription
boolean

Whether the begin field is set.

hasId()

public boolean hasId()

Execute the read or SQL query in a previously-started transaction.

bytes id = 2;

Returns
TypeDescription
boolean

Whether the id field is set.

hasSingleUse()

public boolean hasSingleUse()

Execute the read or SQL query in a temporary transaction. This is the most efficient way to execute a transaction that consists of a single SQL query.

.google.spanner.v1.TransactionOptions single_use = 1;

Returns
TypeDescription
boolean

Whether the singleUse 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

newBuilder()

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

newBuilder(TransactionSelector prototype)

public static TransactionSelector.Builder newBuilder(TransactionSelector prototype)
Parameter
NameDescription
prototypeTransactionSelector
Returns
TypeDescription
TransactionSelector.Builder

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

toBuilder()

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

writeTo(CodedOutputStream output)

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