TransactionOptions

Options for creating a new transaction.

JSON representation
{

  // Union field mode can be only one of the following:
  "readOnly": {
    object(ReadOnly)
  },
  "readWrite": {
    object(ReadWrite)
  }
  // End of list of possible types for union field mode.
}
Fields
Union field mode. The mode of the transaction. mode can be only one of the following:
readOnly

object(ReadOnly)

The transaction can only be used for read operations.

readWrite

object(ReadWrite)

The transaction can be used for both read and write operations.

ReadOnly

Options for a transaction that can only be used to read documents.

JSON representation
{
  "readTime": string
}
Fields
readTime

string (Timestamp format)

Reads documents at the given time. This may not be older than 60 seconds.

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

ReadWrite

Options for a transaction that can be used to read and write documents.

JSON representation
{
  "retryTransaction": string
}
Fields
retryTransaction

string (bytes format)

An optional transaction to retry.

A base64-encoded string.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Firestore