public final class ReadRequest extends com.google.protobuf.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].
|
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 |
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 |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getColumns(int index)
Required.
|
com.google.protobuf.ByteString |
getColumnsBytes(int index)
Required.
|
int |
getColumnsCount()
Required.
|
com.google.protobuf.ProtocolStringList |
getColumnsList()
Required.
|
static ReadRequest |
getDefaultInstance() |
ReadRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getIndex()
If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].
|
com.google.protobuf.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.
|
com.google.protobuf.Parser<ReadRequest> |
getParserForType() |
com.google.protobuf.ByteString |
getPartitionToken()
If present, results will be restricted to the specified partition
previously created using PartitionRead().
|
RequestOptions |
getRequestOptions()
Common options for this request.
|
RequestOptionsOrBuilder |
getRequestOptionsOrBuilder()
Common options for this request.
|
com.google.protobuf.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() |
String |
getSession()
Required.
|
com.google.protobuf.ByteString |
getSessionBytes()
Required.
|
String |
getTable()
Required.
|
com.google.protobuf.ByteString |
getTableBytes()
Required.
|
TransactionSelector |
getTransaction()
The transaction to use.
|
TransactionSelectorOrBuilder |
getTransactionOrBuilder()
The transaction to use.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasKeySet()
Required.
|
boolean |
hasRequestOptions()
Common options for this request.
|
boolean |
hasTransaction()
The transaction to use.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ReadRequest.Builder |
newBuilder() |
static ReadRequest.Builder |
newBuilder(ReadRequest prototype) |
ReadRequest.Builder |
newBuilderForType() |
protected ReadRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static ReadRequest |
parseDelimitedFrom(InputStream input) |
static ReadRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(byte[] data) |
static ReadRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(ByteBuffer data) |
static ReadRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(com.google.protobuf.ByteString data) |
static ReadRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ReadRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ReadRequest |
parseFrom(InputStream input) |
static ReadRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ReadRequest> |
parser() |
ReadRequest.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, 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 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(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public 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 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 ReadRequestOrBuilderpublic com.google.protobuf.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 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 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 ReadRequestOrBuilderpublic com.google.protobuf.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 ReadRequestOrBuilderpublic 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 com.google.protobuf.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 com.google.protobuf.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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderpublic 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 ReadRequestOrBuilderindex - The index of the element to return.public com.google.protobuf.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 ReadRequestOrBuilderindex - 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 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 [(.google.api.field_behavior) = REQUIRED];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 [(.google.api.field_behavior) = REQUIRED];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 com.google.protobuf.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 com.google.protobuf.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 boolean hasRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;hasRequestOptions in interface ReadRequestOrBuilderpublic RequestOptions getRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;getRequestOptions in interface ReadRequestOrBuilderpublic RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;getRequestOptionsOrBuilder in interface ReadRequestOrBuilderpublic 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 ReadRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ReadRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static ReadRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ReadRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ReadRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ReadRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ReadRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ReadRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ReadRequest.Builder newBuilder()
public static ReadRequest.Builder newBuilder(ReadRequest prototype)
public ReadRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ReadRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ReadRequest getDefaultInstance()
public static com.google.protobuf.Parser<ReadRequest> parser()
public com.google.protobuf.Parser<ReadRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ReadRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2021 Google LLC. All rights reserved.