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| 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 |
RESUME_TOKEN_FIELD_NUMBER |
static int |
SESSION_FIELD_NUMBER |
static int |
TABLE_FIELD_NUMBER |
static int |
TRANSACTION_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getColumns(int index)
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching
this request.
|
ByteString |
getColumnsBytes(int index)
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching
this request.
|
int |
getColumnsCount()
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching
this request.
|
ProtocolStringList |
getColumnsList()
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching
this request.
|
static ReadRequest |
getDefaultInstance() |
ReadRequest |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getIndex()
If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].
|
ByteString |
getIndexBytes()
If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].
|
KeySet |
getKeySet()
Required.
|
KeySetOrBuilder |
getKeySetOrBuilder()
Required.
|
long |
getLimit()
If greater than zero, only the first `limit` rows are yielded.
|
Parser<ReadRequest> |
getParserForType() |
ByteString |
getPartitionToken()
If present, results will be restricted to the specified partition
previously created using PartitionRead().
|
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.
|
int |
getSerializedSize() |
java.lang.String |
getSession()
Required.
|
ByteString |
getSessionBytes()
Required.
|
java.lang.String |
getTable()
Required.
|
ByteString |
getTableBytes()
Required.
|
TransactionSelector |
getTransaction()
The transaction to use.
|
TransactionSelectorOrBuilder |
getTransactionOrBuilder()
The transaction to use.
|
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasKeySet()
Required.
|
boolean |
hasTransaction()
The transaction to use.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ReadRequest.Builder |
newBuilder() |
static ReadRequest.Builder |
newBuilder(ReadRequest prototype) |
ReadRequest.Builder |
newBuilderForType() |
protected ReadRequest.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static ReadRequest |
parseDelimitedFrom(java.io.InputStream input) |
static ReadRequest |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(byte[] data) |
static ReadRequest |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(java.nio.ByteBuffer data) |
static ReadRequest |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(ByteString data) |
static ReadRequest |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(CodedInputStream input) |
static ReadRequest |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(java.io.InputStream input) |
static ReadRequest |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<ReadRequest> |
parser() |
ReadRequest.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, 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, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic 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 final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.lang.String getSession()
Required. The session in which the read should be performed.
string session = 1;getSession in interface ReadRequestOrBuilderpublic ByteString getSessionBytes()
Required. The session in which the read should be performed.
string session = 1;getSessionBytes in interface ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic java.lang.String getTable()
Required. The name of the table in the database to be read.
string table = 3;getTable in interface ReadRequestOrBuilderpublic ByteString getTableBytes()
Required. The name of the table in the database to be read.
string table = 3;getTableBytes in interface ReadRequestOrBuilderpublic java.lang.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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic ProtocolStringList getColumnsList()
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5;getColumnsList in interface ReadRequestOrBuilderpublic int getColumnsCount()
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5;getColumnsCount in interface ReadRequestOrBuilderpublic java.lang.String getColumns(int index)
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5;getColumns in interface ReadRequestOrBuilderpublic ByteString getColumnsBytes(int index)
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
repeated string columns = 5;getColumnsBytes in interface ReadRequestOrBuilderpublic 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;hasKeySet in interface ReadRequestOrBuilderpublic 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;getKeySet in interface ReadRequestOrBuilderpublic 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;getKeySetOrBuilder in interface ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static ReadRequest parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static ReadRequest parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static ReadRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static ReadRequest parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static ReadRequest parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static ReadRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic ReadRequest.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static ReadRequest.Builder newBuilder()
public static ReadRequest.Builder newBuilder(ReadRequest prototype)
public ReadRequest.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected ReadRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static ReadRequest getDefaultInstance()
public static Parser<ReadRequest> parser()
public Parser<ReadRequest> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public ReadRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder