Package com.google.spanner.v1
Class ReadRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
com.google.spanner.v1.ReadRequest.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ReadRequestOrBuilder,Cloneable
- Enclosing class:
- ReadRequest
public static final class ReadRequest.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
implements ReadRequestOrBuilder
The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead].Protobuf type
google.spanner.v1.ReadRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllColumns(Iterable<String> values) Required.addColumns(String value) Required.addColumnsBytes(com.google.protobuf.ByteString value) Required.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Required.If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources.Directed read options for this request.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].Required.If greater than zero, only the first `limit` rows are yielded.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) If present, results will be restricted to the specified partition previously created using PartitionRead().Common options for this request.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.Required.Required.The transaction to use.clone()getColumns(int index) Required.com.google.protobuf.ByteStringgetColumnsBytes(int index) Required.intRequired.com.google.protobuf.ProtocolStringListRequired.booleanIf this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDirected read options for this request.Directed read options for this request.Directed read options for this request.getIndex()If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].com.google.protobuf.ByteStringIf non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].Required.Required.Required.longgetLimit()If greater than zero, only the first `limit` rows are yielded.com.google.protobuf.ByteStringIf present, results will be restricted to the specified partition previously created using PartitionRead().Common options for this request.Common options for this request.Common options for this request.com.google.protobuf.ByteStringIf 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.Required.com.google.protobuf.ByteStringRequired.getTable()Required.com.google.protobuf.ByteStringRequired.The transaction to use.The transaction to use.The transaction to use.booleanDirected read options for this request.booleanRequired.booleanCommon options for this request.booleanThe transaction to use.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanDirected read options for this request.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(ReadRequest other) mergeKeySet(KeySet value) Required.Common options for this request.The transaction to use.final ReadRequest.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setColumns(int index, String value) Required.setDataBoostEnabled(boolean value) If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources.Directed read options for this request.setDirectedReadOptions(DirectedReadOptions.Builder builderForValue) Directed read options for this request.If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].setIndexBytes(com.google.protobuf.ByteString value) If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table].Required.setKeySet(KeySet.Builder builderForValue) Required.setLimit(long value) If greater than zero, only the first `limit` rows are yielded.setPartitionToken(com.google.protobuf.ByteString value) If present, results will be restricted to the specified partition previously created using PartitionRead().setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRequestOptions(RequestOptions value) Common options for this request.setRequestOptions(RequestOptions.Builder builderForValue) Common options for this request.setResumeToken(com.google.protobuf.ByteString value) 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.setSession(String value) Required.setSessionBytes(com.google.protobuf.ByteString value) Required.Required.setTableBytes(com.google.protobuf.ByteString value) Required.The transaction to use.setTransaction(TransactionSelector.Builder builderForValue) The transaction to use.final ReadRequest.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
setField
public ReadRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
setRepeatedField
public ReadRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
addRepeatedField
public ReadRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ReadRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
mergeFrom
public ReadRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ReadRequest.Builder>- Throws:
IOException
-
getSession
Required. The session in which the read should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getSessionin interfaceReadRequestOrBuilder- Returns:
- The session.
-
getSessionBytes
public 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) = { ... }- Specified by:
getSessionBytesin interfaceReadRequestOrBuilder- Returns:
- The bytes for session.
-
setSession
Required. The session in which the read should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The session to set.- Returns:
- This builder for chaining.
-
clearSession
Required. The session in which the read should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setSessionBytes
Required. The session in which the read should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for session to set.- Returns:
- This builder for chaining.
-
hasTransaction
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;- Specified by:
hasTransactionin interfaceReadRequestOrBuilder- Returns:
- Whether the transaction field is set.
-
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;- Specified by:
getTransactionin interfaceReadRequestOrBuilder- Returns:
- The transaction.
-
setTransaction
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; -
setTransaction
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; -
mergeTransaction
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; -
clearTransaction
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; -
getTransactionBuilder
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
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;- Specified by:
getTransactionOrBuilderin interfaceReadRequestOrBuilder
-
getTable
Required. The name of the table in the database to be read.
string table = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTablein interfaceReadRequestOrBuilder- Returns:
- The table.
-
getTableBytes
public 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];- Specified by:
getTableBytesin interfaceReadRequestOrBuilder- Returns:
- The bytes for table.
-
setTable
Required. The name of the table in the database to be read.
string table = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The table to set.- Returns:
- This builder for chaining.
-
clearTable
Required. The name of the table in the database to be read.
string table = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setTableBytes
Required. The name of the table in the database to be read.
string table = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for table to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getIndexin interfaceReadRequestOrBuilder- Returns:
- The index.
-
getIndexBytes
public 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;- Specified by:
getIndexBytesin interfaceReadRequestOrBuilder- Returns:
- The bytes for index.
-
setIndex
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;- Parameters:
value- The index to set.- Returns:
- This builder for chaining.
-
clearIndex
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;- Returns:
- This builder for chaining.
-
setIndexBytes
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;- Parameters:
value- The bytes for index to set.- Returns:
- This builder for chaining.
-
getColumnsList
public 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];- Specified by:
getColumnsListin interfaceReadRequestOrBuilder- Returns:
- A list containing the columns.
-
getColumnsCount
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];- Specified by:
getColumnsCountin interfaceReadRequestOrBuilder- Returns:
- The count of columns.
-
getColumns
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];- Specified by:
getColumnsin interfaceReadRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The columns at the given index.
-
getColumnsBytes
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];- Specified by:
getColumnsBytesin interfaceReadRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the columns at the given index.
-
setColumns
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];- Parameters:
index- The index to set the value at.value- The columns to set.- Returns:
- This builder for chaining.
-
addColumns
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];- Parameters:
value- The columns to add.- Returns:
- This builder for chaining.
-
addAllColumns
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];- Parameters:
values- The columns to add.- Returns:
- This builder for chaining.
-
clearColumns
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];- Returns:
- This builder for chaining.
-
addColumnsBytes
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];- Parameters:
value- The bytes of the columns to add.- Returns:
- This builder for chaining.
-
hasKeySet
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];- Specified by:
hasKeySetin interfaceReadRequestOrBuilder- Returns:
- Whether the keySet field is set.
-
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];- Specified by:
getKeySetin interfaceReadRequestOrBuilder- Returns:
- The keySet.
-
setKeySet
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]; -
setKeySet
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]; -
mergeKeySet
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]; -
clearKeySet
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]; -
getKeySetBuilder
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
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];- Specified by:
getKeySetOrBuilderin interfaceReadRequestOrBuilder
-
getLimit
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;- Specified by:
getLimitin interfaceReadRequestOrBuilder- Returns:
- The limit.
-
setLimit
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;- Parameters:
value- The limit to set.- Returns:
- This builder for chaining.
-
clearLimit
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;- Returns:
- This builder for chaining.
-
getResumeToken
public 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;- Specified by:
getResumeTokenin interfaceReadRequestOrBuilder- Returns:
- The resumeToken.
-
setResumeToken
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;- Parameters:
value- The resumeToken to set.- Returns:
- This builder for chaining.
-
clearResumeToken
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;- Returns:
- This builder for chaining.
-
getPartitionToken
public 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;- Specified by:
getPartitionTokenin interfaceReadRequestOrBuilder- Returns:
- The partitionToken.
-
setPartitionToken
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;- Parameters:
value- The partitionToken to set.- Returns:
- This builder for chaining.
-
clearPartitionToken
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;- Returns:
- This builder for chaining.
-
hasRequestOptions
public boolean hasRequestOptions()Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;- Specified by:
hasRequestOptionsin interfaceReadRequestOrBuilder- Returns:
- Whether the requestOptions field is set.
-
getRequestOptions
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;- Specified by:
getRequestOptionsin interfaceReadRequestOrBuilder- Returns:
- The requestOptions.
-
setRequestOptions
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11; -
setRequestOptions
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11; -
mergeRequestOptions
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11; -
clearRequestOptions
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11; -
getRequestOptionsBuilder
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11; -
getRequestOptionsOrBuilder
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;- Specified by:
getRequestOptionsOrBuilderin interfaceReadRequestOrBuilder
-
hasDirectedReadOptions
public boolean hasDirectedReadOptions()Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14;- Specified by:
hasDirectedReadOptionsin interfaceReadRequestOrBuilder- Returns:
- Whether the directedReadOptions field is set.
-
getDirectedReadOptions
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14;- Specified by:
getDirectedReadOptionsin interfaceReadRequestOrBuilder- Returns:
- The directedReadOptions.
-
setDirectedReadOptions
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14; -
setDirectedReadOptions
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14; -
mergeDirectedReadOptions
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14; -
clearDirectedReadOptions
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14; -
getDirectedReadOptionsBuilder
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14; -
getDirectedReadOptionsOrBuilder
Directed read options for this request.
.google.spanner.v1.DirectedReadOptions directed_read_options = 14;- Specified by:
getDirectedReadOptionsOrBuilderin interfaceReadRequestOrBuilder
-
getDataBoostEnabled
public boolean getDataBoostEnabled()If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
bool data_boost_enabled = 15;- Specified by:
getDataBoostEnabledin interfaceReadRequestOrBuilder- Returns:
- The dataBoostEnabled.
-
setDataBoostEnabled
If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
bool data_boost_enabled = 15;- Parameters:
value- The dataBoostEnabled to set.- Returns:
- This builder for chaining.
-
clearDataBoostEnabled
If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
bool data_boost_enabled = 15;- Returns:
- This builder for chaining.
-
setUnknownFields
public final ReadRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-
mergeUnknownFields
public final ReadRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
-