ReadRequest
class ReadRequest extends Message
The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead].
Protobuf type Google\Spanner\V1\ReadRequest
Methods
No description
Required. The session in which the read should be performed.
Required. The session in which the read should be performed.
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
Required. The name of the table in the database to be read.
Required. The name of the table in the database to be read.
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.
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.
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
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].
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 greater than zero, only the first limit
rows are yielded. If limit
is zero, the default is no limit.
If greater than zero, only the first limit
rows are yielded. If limit
is zero, the default is no limit.
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.
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.
Details
at line 85
__construct()
at line 96
string
getSession()
Required. The session in which the read should be performed.
Generated from protobuf field string session = 1;
at line 107
setSession(string $var)
Required. The session in which the read should be performed.
Generated from protobuf field string session = 1;
at line 120
TransactionSelector
getTransaction()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
Generated from protobuf field .google.spanner.v1.TransactionSelector transaction = 2;
at line 132
setTransaction(TransactionSelector $var)
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
Generated from protobuf field .google.spanner.v1.TransactionSelector transaction = 2;
at line 144
string
getTable()
Required. The name of the table in the database to be read.
Generated from protobuf field string table = 3;
at line 155
setTable(string $var)
Required. The name of the table in the database to be read.
Generated from protobuf field string table = 3;
at line 169
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.
Generated from protobuf field string index = 4;
at line 182
setIndex(string $var)
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.
Generated from protobuf field string index = 4;
at line 195
RepeatedField
getColumns()
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
Generated from protobuf field repeated string columns = 5;
at line 207
setColumns(array|RepeatedField $var)
The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.
Generated from protobuf field repeated string columns = 5;
at line 226
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].
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).
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.
Generated from protobuf field .google.spanner.v1.KeySet key_set = 6;
at line 244
setKeySet(KeySet $var)
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].
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).
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.
Generated from protobuf field .google.spanner.v1.KeySet key_set = 6;
at line 257
int|string
getLimit()
If greater than zero, only the first limit
rows are yielded. If limit
is zero, the default is no limit.
Generated from protobuf field int64 limit = 8;
at line 269
setLimit(int|string $var)
If greater than zero, only the first limit
rows are yielded. If limit
is zero, the default is no limit.
Generated from protobuf field int64 limit = 8;
at line 286
string
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.
Generated from protobuf field bytes resume_token = 9;
at line 302
setResumeToken(string $var)
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.
Generated from protobuf field bytes resume_token = 9;