Unit Of Work#
Important
The synchronous version is generated from the async version
Async#
Unit of work
- class purgatory.service._async.unit_of_work.AsyncAbstractUnitOfWork#
-
- collect_new_events() Generator[purgatory.domain.messages.base.Message, None, None] #
- async initialize() None #
Override to initialize repositories.
- abstract async commit() None #
Commit the transation.
- abstract async rollback() None #
Rollback the transation.
Sync#
Unit of work
- class purgatory.service._sync.unit_of_work.SyncAbstractUnitOfWork#
-
- collect_new_events() Generator[purgatory.domain.messages.base.Message, None, None] #
- initialize() None #
Override to initialize repositories.
- abstract commit() None #
Commit the transation.
- abstract rollback() None #
Rollback the transation.