budosystems.services.operations.AsyncUnitOfWork

class AsyncUnitOfWork

Bases: ABC

See: https://martinfowler.com/eaaCatalog/unitOfWork.html

repo: Repository
__init__(*_args: Any, **_kwargs: Any) None
committed: bool
async commit() None

This method must be called to mark the end of a complete transaction.

Implementations of this class should override this method and call super().commit().

abstract async rollback() None

This method will be called if the context manager exits without being committed.

Implementations must bring the state back to what it was before entering the context.