Options for beginning a new transaction.
Transactions can be created explicitly with calls to Datastore.BeginTransaction
or implicitly by setting ReadOptions.new_transaction
in read requests.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field mode . The mode of the transaction, indicating whether write operations are supported. mode can be only one of the following: |
|
readWrite |
The transaction should allow both reads and writes. |
readOnly |
The transaction should only allow reads. |
ReadWrite
Options specific to read / write transactions.
JSON representation |
---|
{ "previousTransaction": string } |
Fields | |
---|---|
previousTransaction |
The transaction identifier of the transaction being retried. A base64-encoded string. |
ReadOnly
Options specific to read-only transactions.
JSON representation |
---|
{ "readTime": string } |
Fields | |
---|---|
readTime |
Reads entities at the given time. 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. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |