TransactionOptions

Options to use for transactions.

JSON representation
{
  "excludeTxnFromChangeStreams": boolean,
  "isolationLevel": enum (IsolationLevel),

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

boolean

When excludeTxnFromChangeStreams is set to true, it prevents read or write transactions from being tracked in change streams.

  • If the DDL option allow_txn_exclusion is set to true, then the updates made within this transaction aren't recorded in the change stream.

  • If you don't set the DDL option allow_txn_exclusion or if it's set to false, then the updates made within this transaction are recorded in the change stream.

When excludeTxnFromChangeStreams is set to false or not set, modifications from this transaction are recorded in all change streams that are tracking columns modified by these transactions.

The excludeTxnFromChangeStreams option can only be specified for read-write or partitioned DML transactions, otherwise the API returns an INVALID_ARGUMENT error.

isolationLevel

enum (IsolationLevel)

Isolation level for the transaction.

Union field mode. Required. The type of transaction. mode can be only one of the following:
readWrite

object (ReadWrite)

Transaction may write.

Authorization to begin a read-write transaction requires spanner.databases.beginOrRollbackReadWriteTransaction permission on the session resource.

partitionedDml

object (PartitionedDml)

Partitioned DML transaction.

Authorization to begin a Partitioned DML transaction requires spanner.databases.beginPartitionedDmlTransaction permission on the session resource.

readOnly

object (ReadOnly)

Transaction does not write.

Authorization to begin a read-only transaction requires spanner.databases.beginReadOnlyTransaction permission on the session resource.

ReadWrite

Message type to initiate a read-write transaction. Currently this transaction type has no options.

JSON representation
{
  "multiplexedSessionPreviousTransactionId": string
}
Fields
multiplexedSessionPreviousTransactionId

string (