The options shared by read requests.

JSON representation

  // Union field consistency_type can be only one of the following:
  "readConsistency": enum (ReadConsistency),
  "transaction": string
  // End of list of possible types for union field consistency_type.

Union field consistency_type. For Cloud Datastore, if read_consistency is not specified, then lookups and ancestor queries default to read_consistency=STRONG, global queries default to read_consistency=EVENTUAL.

For Cloud Firestore in Datastore mode, if read_consistency is not specified then lookups and all queries default to read_consistency=STRONG.

Explicitly setting read_consistency=EVENTUAL will result in eventually consistent lookups & queries in both Cloud Datastore & Cloud Firestore in Datastore mode. consistency_type can be only one of the following:


enum (ReadConsistency)

The non-transactional read consistency to use.


string (bytes format)

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

A base64-encoded string.


The possible values for read consistencies.

READ_CONSISTENCY_UNSPECIFIED Unspecified. This value must not be used.
STRONG Strong consistency.
EVENTUAL Eventual consistency.