public final class ReadRequest extends GeneratedMessageV3 implements ReadRequestOrBuilder
The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead].Protobuf type
google.spanner.v1.ReadRequest
Modifier and Type | Class and Description |
---|---|
static class |
ReadRequest.Builder
The request for [Read][google.spanner.v1.Spanner.Read] and
[StreamingRead][google.spanner.v1.Spanner.StreamingRead].
|
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 |
COLUMNS_FIELD_NUMBER |
static int |
INDEX_FIELD_NUMBER |
static int |
KEY_SET_FIELD_NUMBER |
static int |
LIMIT_FIELD_NUMBER |
static int |
PARTITION_TOKEN_FIELD_NUMBER |
static int |
REQUEST_OPTIONS_FIELD_NUMBER |
static int |
RESUME_TOKEN_FIELD_NUMBER |
static int |
SESSION_FIELD_NUMBER |
static int |
TABLE_FIELD_NUMBER |
static int |
TRANSACTION_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
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 SESSION_FIELD_NUMBER
public static final int TRANSACTION_FIELD_NUMBER
public static final int TABLE_FIELD_NUMBER
public static final int INDEX_FIELD_NUMBER
public static final int COLUMNS_FIELD_NUMBER
public static final int KEY_SET_FIELD_NUMBER
public static final int LIMIT_FIELD_NUMBER
public static final int RESUME_TOKEN_FIELD_NUMBER
public static final int PARTITION_TOKEN_FIELD_NUMBER
public static final int REQUEST_OPTIONS_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 String getSession()
Required. The session in which the read should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getSession
in interface ReadRequestOrBuilder
public ByteString getSessionBytes()
Required. The session in which the read should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getSessionBytes
in interface ReadRequestOrBuilder
public boolean hasTransaction()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
.google.spanner.v1.TransactionSelector transaction = 2;
hasTransaction
in interface ReadRequestOrBuilder
public TransactionSelector getTransaction()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
.google.spanner.v1.TransactionSelector transaction = 2;
getTransaction
in interface ReadRequestOrBuilder
public TransactionSelectorOrBuilder getTransactionOrBuilder()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
.google.spanner.v1.TransactionSelector transaction = 2;
getTransactionOrBuilder
in interface ReadRequestOrBuilder
public String getTable()
Required. The name of the table in the database to be read.
string table = 3 [(.google.api.field_behavior) = REQUIRED];
getTable
in interface ReadRequestOrBuilder
public ByteString getTableBytes()
Required. The name of the table in the database to be read.
string table = 3 [(.google.api.field_behavior) = REQUIRED];
getTableBytes
in interface ReadRequestOrBuilder
public String getIndex()
If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table]. This index is used instead of the table primary key when interpreting [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows. See [key_set][google.spanner.v1.ReadRequest.key_set] for further information.
string index = 4;
getIndex
in interface ReadRequestOrBuilder
public ByteString getIndexBytes()
If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table]. This index is used instead of the table primary key when interpreting [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows. See [key_set][google.spanner.v1.ReadRequest.key_set] for further information.
string index = 4;
getIndexBytes
in interface ReadRequestOrBuilder
public ProtocolStringList getColumnsList()
Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
getColumnsList
in interface ReadRequestOrBuilder
public int getColumnsCount()
Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
getColumnsCount
in interface ReadRequestOrBuilder
public String getColumns(int index)
Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
getColumns
in interface ReadRequestOrBuilder
index
- The index of the element to return.public ByteString getColumnsBytes(int index)
Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
getColumnsBytes
in interface ReadRequestOrBuilder
index
- The index of the value to return.public boolean hasKeySet()
Required. `key_set` identifies the rows to be yielded. `key_set` names the primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys in [index][google.spanner.v1.ReadRequest.index]. If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is empty, rows are yielded in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty) or index key order (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is not empty, rows will be yielded in an unspecified order. It is not an error for the `key_set` to name rows that do not exist in the database. Read yields nothing for nonexistent rows.
.google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
hasKeySet
in interface ReadRequestOrBuilder
public KeySet getKeySet()
Required. `key_set` identifies the rows to be yielded. `key_set` names the primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys in [index][google.spanner.v1.ReadRequest.index]. If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is empty, rows are yielded in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty) or index key order (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is not empty, rows will be yielded in an unspecified order. It is not an error for the `key_set` to name rows that do not exist in the database. Read yields nothing for nonexistent rows.
.google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
getKeySet
in interface ReadRequestOrBuilder
public KeySetOrBuilder getKeySetOrBuilder()
Required. `key_set` identifies the rows to be yielded. `key_set` names the primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys in [index][google.spanner.v1.ReadRequest.index]. If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is empty, rows are yielded in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty) or index key order (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the [partition_token][google.spanner.v1.ReadRequest.partition_token] field is not empty, rows will be yielded in an unspecified order. It is not an error for the `key_set` to name rows that do not exist in the database. Read yields nothing for nonexistent rows.
.google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
getKeySetOrBuilder
in interface ReadRequestOrBuilder
public long getLimit()
If greater than zero, only the first `limit` rows are yielded. If `limit` is zero, the default is no limit. A limit cannot be specified if `partition_token` is set.
int64 limit = 8;
getLimit
in interface ReadRequestOrBuilder
public ByteString getResumeToken()
If this request is resuming a previously interrupted read, `resume_token` should be copied from the last [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this enables the new read to resume where the last read left off. The rest of the request parameters must exactly match the request that yielded this token.
bytes resume_token = 9;
getResumeToken
in interface ReadRequestOrBuilder
public ByteString getPartitionToken()
If present, results will be restricted to the specified partition previously created using PartitionRead(). There must be an exact match for the values of fields common to this message and the PartitionReadRequest message used to create this partition_token.
bytes partition_token = 10;
getPartitionToken
in interface ReadRequestOrBuilder
public boolean hasRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
hasRequestOptions
in interface ReadRequestOrBuilder
public RequestOptions getRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
getRequestOptions
in interface ReadRequestOrBuilder
public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
getRequestOptionsOrBuilder
in interface ReadRequestOrBuilder
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 ReadRequest parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ReadRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ReadRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ReadRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ReadRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ReadRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ReadRequest parseFrom(InputStream input) throws IOException
IOException
public static ReadRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ReadRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static ReadRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ReadRequest parseFrom(CodedInputStream input) throws IOException
IOException
public static ReadRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public ReadRequest.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static ReadRequest.Builder newBuilder()
public static ReadRequest.Builder newBuilder(ReadRequest prototype)
public ReadRequest.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected ReadRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static ReadRequest getDefaultInstance()
public static Parser<ReadRequest> parser()
public Parser<ReadRequest> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public ReadRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.