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

__construct()

No description

string
getSession()

Required. The session in which the read should be performed.

setSession(string $var)

Required. The session in which the read should be performed.

getTransaction()

The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.

setTransaction(TransactionSelector $var)

The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.

string
getTable()

Required. The name of the table in the database to be read.

setTable(string $var)

Required. The name of the table in the database to be read.

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.

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.

RepeatedField
getColumns()

The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.

setColumns(array|RepeatedField $var)

The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching this request.

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].

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].

int|string
getLimit()

If greater than zero, only the first limit rows are yielded. If limit is zero, the default is no limit.

setLimit(int|string $var)

If greater than zero, only the first limit rows are yielded. If limit is zero, the default is no limit.

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.

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.

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;

Return Value

string

at line 107
setSession(string $var)

Required. The session in which the read should be performed.

Generated from protobuf field string session = 1;

Parameters

string $var

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;

Return Value

TransactionSelector

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;

Parameters

TransactionSelector $var

at line 144
string getTable()

Required. The name of the table in the database to be read.

Generated from protobuf field string table = 3;

Return Value

string

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;

Parameters

string $var

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;

Return Value

string

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;

Parameters

string $var

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;

Return Value

RepeatedField

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;

Parameters

array|RepeatedField $var

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;

Return Value

KeySet

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;

Parameters

KeySet $var

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;

Return Value

int|string

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;

Parameters

int|string $var

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;

Return Value

string

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;

Parameters

string $var