Cloud Datastore V1 Client - Class ReadOptions (1.17.1)

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

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

Generated from protobuf field .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
TypeDescription
int

hasReadConsistency

setReadConsistency

The non-transactional read consistency to use.

Generated from protobuf field .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

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.

Generated from protobuf field bytes transaction = 2;

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.

Generated from protobuf field bytes transaction = 2;

Parameter
NameDescription
var string
Returns
TypeDescription
$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.

Generated from protobuf field .google.protobuf.Timestamp read_time = 4;

Returns
TypeDescription
Google\Protobuf\Timestamp|null

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.

Generated from protobuf field .google.protobuf.Timestamp read_time = 4;

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

getConsistencyType

Returns
TypeDescription
string