{// Union field consistency_type can be only one of the following:"readConsistency": enum (ReadConsistency),"transaction": string,"newTransaction": {object (TransactionOptions)},"readTime": string// End of list of possible types for union field consistency_type.}
Fields
Union field consistency_type. For Cloud Firestore in Datastore mode, if you don't specify read_consistency then all lookups and queries default to read_consistency=STRONG. Note that, in Cloud Datastore, global queries defaulted to read_consistency=EVENTUAL.
Explicitly setting read_consistency=EVENTUAL will result in eventually consistent lookups and queries. consistency_type can be only one of the following:
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.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted.Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[[["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-04-30 UTC."],[[["\u003cp\u003eThe \u003ccode\u003econsistency_type\u003c/code\u003e field in read requests determines the read consistency and can only be one of: \u003ccode\u003ereadConsistency\u003c/code\u003e, \u003ccode\u003etransaction\u003c/code\u003e, \u003ccode\u003enewTransaction\u003c/code\u003e, or \u003ccode\u003ereadTime\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor Cloud Firestore in Datastore mode, lookups and queries default to \u003ccode\u003eSTRONG\u003c/code\u003e read consistency if \u003ccode\u003eread_consistency\u003c/code\u003e is not specified; however, \u003ccode\u003eEVENTUAL\u003c/code\u003e consistency can be set explicitly for eventual consistency.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ereadConsistency\u003c/code\u003e supports \u003ccode\u003eSTRONG\u003c/code\u003e and \u003ccode\u003eEVENTUAL\u003c/code\u003e values, while \u003ccode\u003eREAD_CONSISTENCY_UNSPECIFIED\u003c/code\u003e must not be used.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003etransaction\u003c/code\u003e utilizes a base64-encoded string as an identifier returned from \u003ccode\u003eDatastore.BeginTransaction\u003c/code\u003e to determine which transaction to read from.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ereadTime\u003c/code\u003e parameter sets entities to be read as of a given point in time, and is only available when using Cloud Firestore in Datastore mode.\u003c/p\u003e\n"]]],[],null,["# ReadOptions\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ReadConsistency](#ReadConsistency)\n\nThe options shared by read requests.\n\nReadConsistency\n---------------\n\nThe possible values for read consistencies."]]