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
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 toDatastore.BeginTransaction.
Returns
Type
Description
string
hasTransaction
setTransaction
The identifier of the transaction in which to read. A
transaction identifier is returned by a call toDatastore.BeginTransaction.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNewTransaction
Options for beginning a new transaction for this request.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Datastore V1 Client - Class ReadOptions (1.33.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.33.1 (latest)](/php/docs/reference/cloud-datastore/latest/V1.ReadOptions)\n- [1.33.0](/php/docs/reference/cloud-datastore/1.33.0/V1.ReadOptions)\n- [1.32.3](/php/docs/reference/cloud-datastore/1.32.3/V1.ReadOptions)\n- [1.31.0](/php/docs/reference/cloud-datastore/1.31.0/V1.ReadOptions)\n- [1.30.0](/php/docs/reference/cloud-datastore/1.30.0/V1.ReadOptions)\n- [1.29.2](/php/docs/reference/cloud-datastore/1.29.2/V1.ReadOptions)\n- [1.28.2](/php/docs/reference/cloud-datastore/1.28.2/V1.ReadOptions)\n- [1.26.0](/php/docs/reference/cloud-datastore/1.26.0/V1.ReadOptions)\n- [1.25.0](/php/docs/reference/cloud-datastore/1.25.0/V1.ReadOptions)\n- [1.24.4](/php/docs/reference/cloud-datastore/1.24.4/V1.ReadOptions)\n- [1.23.0](/php/docs/reference/cloud-datastore/1.23.0/V1.ReadOptions)\n- [1.22.1](/php/docs/reference/cloud-datastore/1.22.1/V1.ReadOptions)\n- [1.21.2](/php/docs/reference/cloud-datastore/1.21.2/V1.ReadOptions)\n- [1.19.0](/php/docs/reference/cloud-datastore/1.19.0/V1.ReadOptions)\n- [1.18.1](/php/docs/reference/cloud-datastore/1.18.1/V1.ReadOptions)\n- [1.17.1](/php/docs/reference/cloud-datastore/1.17.1/V1.ReadOptions) \nReference documentation and code samples for the Cloud Datastore V1 Client class ReadOptions.\n\nThe options shared by read requests.\n\nGenerated from protobuf message `google.datastore.v1.ReadOptions`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Datastore \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getReadConsistency\n\nThe non-transactional read consistency to use.\n\n### hasReadConsistency\n\n### setReadConsistency\n\nThe non-transactional read consistency to use.\n\n### getTransaction\n\nThe identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.\n\n### hasTransaction\n\n### setTransaction\n\nThe identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.\n\n### getNewTransaction\n\nOptions for beginning a new transaction for this request.\n\nThe new transaction identifier will be returned in the corresponding\nresponse as either\n[LookupResponse.transaction](/php/docs/reference/cloud-datastore/latest/V1.LookupResponse#_Google_Cloud_Datastore_V1_LookupResponse__getTransaction__)\nor\n[RunQueryResponse.transaction](/php/docs/reference/cloud-datastore/latest/V1.RunQueryResponse#_Google_Cloud_Datastore_V1_RunQueryResponse__getTransaction__).\n\n### hasNewTransaction\n\n### setNewTransaction\n\nOptions for beginning a new transaction for this request.\n\nThe new transaction identifier will be returned in the corresponding\nresponse as either\n[LookupResponse.transaction](/php/docs/reference/cloud-datastore/latest/V1.LookupResponse#_Google_Cloud_Datastore_V1_LookupResponse__getTransaction__)\nor\n[RunQueryResponse.transaction](/php/docs/reference/cloud-datastore/latest/V1.RunQueryResponse#_Google_Cloud_Datastore_V1_RunQueryResponse__getTransaction__).\n\n### getReadTime\n\nReads entities as they were at the given time. This value is only\nsupported for Cloud Firestore in Datastore mode.\n\nThis must be a microsecond precision timestamp within the past one hour,\nor if Point-in-Time Recovery is enabled, can additionally be a whole\nminute timestamp within the past 7 days.\n\n### hasReadTime\n\n### setReadTime\n\nReads entities as they were at the given time. This value is only\nsupported for Cloud Firestore in Datastore mode.\n\nThis must be a microsecond precision timestamp within the past one hour,\nor if Point-in-Time Recovery is enabled, can additionally be a whole\nminute timestamp within the past 7 days.\n\n### getConsistencyType"]]