Class TransactionOptions (3.4.0)

TransactionOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)

TransactionOptions are used to specify different types of transactions.

For more info, see: https://cloud.google.com/spanner/docs/reference/rest/v1/Transaction

Attributes

NameDescription
read_write google.cloud.spanner_v1.types.TransactionOptions.ReadWrite
Transaction may write. Authorization to begin a read-write transaction requires spanner.databases.beginOrRollbackReadWriteTransaction permission on the session resource.
partitioned_dml google.cloud.spanner_v1.types.TransactionOptions.PartitionedDml
Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires spanner.databases.beginPartitionedDmlTransaction permission on the session resource.
read_only google.cloud.spanner_v1.types.TransactionOptions.ReadOnly
Transaction will not write. Authorization to begin a read-only transaction requires spanner.databases.beginReadOnlyTransaction permission on the session resource.

Classes

PartitionedDml

PartitionedDml(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Message type to initiate a Partitioned DML transaction.

ReadOnly

ReadOnly(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Message type to initiate a read-only transaction.

ReadWrite

ReadWrite(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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