Class TransactionSelector (3.14.1)

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

This message is used to select the transaction in which a Read][google.spanner.v1.Spanner.Read] or ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.

See TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
single_use google.cloud.spanner_v1.types.TransactionOptions
Execute the read or SQL query in a temporary transaction. This is the most efficient way to execute a transaction that consists of a single SQL query. This field is a member of oneof_ selector.
id bytes
Execute the read or SQL query in a previously-started transaction. This field is a member of oneof_ selector.
begin google.cloud.spanner_v1.types.TransactionOptions
Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a Transaction][google.spanner.v1.Transaction]. This field is a member of oneof_ selector.