Cloud Datastore V1 Client - Class ReadOptions (1.19.0)

Reference documentation and code samples for the Cloud Datastore V1 Client class ReadOptions.

The options shared by read requests.

Generated from protobuf message google.datastore.v1.ReadOptions

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ read_consistency
int

The non-transactional read consistency to use.

↳ transaction
string

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction .

↳ new_transaction
Google\Cloud\Datastore\V1\TransactionOptions

Options for beginning a new transaction for this request. The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction .

↳ read_time
Google\Protobuf\Timestamp

Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode.

getReadConsistency

The non-transactional read consistency to use.

Returns
Type
Description
int

hasReadConsistency

setReadConsistency

The non-transactional read consistency to use.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getTransaction

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction .

Returns
Type
Description
string

hasTransaction

setTransaction

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getNewTransaction

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction .

Returns
Type
Description

hasNewTransaction

setNewTransaction

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction .

Parameter
Name
Description
Returns
Type
Description
$this

getReadTime

Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode.

Returns
Type
Description

hasReadTime

setReadTime

Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode.

Parameter
Name
Description
Returns
Type
Description
$this

getConsistencyType

Returns
Type
Description
string
Design a Mobile Site
View Site in Mobile | Classic
Share by: