Module transaction

Helpers for applying Google Cloud Firestore changes in a transaction.

Classes

Transaction

Transaction(client, max_attempts=5, read_only=False)

Accumulate read-and-write operations to be sent in a transaction.

Modules Functions

transactional

transactional(to_wrap: Callable)

Decorate a callable so that it runs in a transaction.

Parameter
NameDescription
to_wrap

(Callable[[Transaction, ...], Any]): A callable that should be run (and retried) in a transaction.

Returns
TypeDescription
Callable[[Transaction, ...], Any]the wrapped callable.