Cloud Datastore V1 Client - Class ReadOptions (1.25.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

Namespace

Google \ Cloud \ Datastore \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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 value is only supported for Cloud Firestore in Datastore mode. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

getReadConsistency

The non-transactional read consistency to use.

Returns
TypeDescription
int

hasReadConsistency

setReadConsistency

The non-transactional read consistency to use.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTransaction

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

Returns
TypeDescription
string

hasTransaction

setTransaction

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

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
Google\Cloud\Datastore\V1\TransactionOptions|null

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
NameDescription
var Google\Cloud\Datastore\V1\TransactionOptions
Returns
TypeDescription
$this

getReadTime

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasReadTime

setReadTime

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getConsistencyType

Returns
TypeDescription
string