Transaction

A transaction.

JSON representation
{"id":string,"readTimestamp":string,"precommitToken":{object (MultiplexedSessionPrecommitToken)}}
Fields
id

string (bytes format)

id may be used to identify the transaction in subsequentsessions.read,ExecuteSql,Commit, orsessions.rollback calls.

Single-use read-only transactions do not have IDs, because single-use transactions do not support multiple requests.

A base64-encoded string.

readTimestamp

string (Timestamp format)

For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: seeTransactionOptions.ReadOnly.return_read_timestamp.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example:"2014-10-02T15:01:23.045123456Z".

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

precommitToken

object (MultiplexedSessionPrecommitToken)

A precommit token is included in the response of a sessions.beginTransaction request if the read-write transaction is on a multiplexed session and a mutationKey was specified in thesessions.beginTransaction. The precommit token with the highest sequence number from this transaction attempt should be passed to theCommit request for this transaction.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-12 UTC.