{// Union field mode can be only one of the following:"readWrite": {object (ReadWrite)},"readOnly": {object (ReadOnly)}// End of list of possible types for union field mode.}
Fields
Union field mode. The mode of the transaction, indicating whether write operations are supported. mode can be only one of the following:
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\u003eTransactions can be explicitly initiated using \u003ccode\u003eDatastore.BeginTransaction\u003c/code\u003e or implicitly through \u003ccode\u003eReadOptions.new_transaction\u003c/code\u003e in read requests.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003emode\u003c/code\u003e field determines a transaction's type, with options for \u003ccode\u003ereadWrite\u003c/code\u003e allowing both reads and writes, or \u003ccode\u003ereadOnly\u003c/code\u003e permitting only reads.\u003c/p\u003e\n"],["\u003cp\u003eRead/write transactions use the \u003ccode\u003epreviousTransaction\u003c/code\u003e field to specify a retried transaction's identifier, represented as a base64-encoded string.\u003c/p\u003e\n"],["\u003cp\u003eRead-only transactions employ the \u003ccode\u003ereadTime\u003c/code\u003e field to indicate a specific timestamp for reading entities, supporting microsecond precision within the last hour, or whole minute precision within the past 7 days if Point-in-Time Recovery is enabled.\u003c/p\u003e\n"]]],[],null,["# TransactionOptions\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ReadWrite](#ReadWrite)\n - [JSON representation](#ReadWrite.SCHEMA_REPRESENTATION)\n- [ReadOnly](#ReadOnly)\n - [JSON representation](#ReadOnly.SCHEMA_REPRESENTATION)\n\nOptions for beginning a new transaction.\n\nTransactions can be created explicitly with calls to [Datastore.BeginTransaction](/datastore/docs/reference/data/rest/v1/projects/beginTransaction#google.datastore.v1.Datastore.BeginTransaction) or implicitly by setting [ReadOptions.new_transaction](/datastore/docs/reference/data/rest/v1/ReadOptions#FIELDS.new_transaction) in read requests.\n\nReadWrite\n---------\n\nOptions specific to read / write transactions.\n\nReadOnly\n--------\n\nOptions specific to read-only transactions."]]