UnitOfWork package (ska_db_oda.unitofwork)
-
class ska_db_oda.unitofwork.AbstractUnitOfWork[source]
Provides the interface to store or retrieve a group of OSO Entities.
Commits or rollsback a series of database transactions as an atomic operation
-
abstract commit()[source]
Commit the entities added to this Unit of Work to the database atomically.
- Raises:
ValueError – if the validation of committed sbds or the metadata fails
- Return type:
None
-
abstract rollback()[source]
Initiate the rollback of this Unit of Work.
If no commit is carried out or an error is raised,
the unit of work is rolled back to a safe state
- Return type:
None
-
class ska_db_oda.unitofwork.PostgresUnitOfWork[source]
A PostgreSQL implementation of the UoW.
Persists data in an instance of PostgreSQL specified in the
initialisation config.
-
commit()[source]
Implement the AbstractUnitOfWork method.
See commit() docstring for details
- Return type:
None
-
rollback()[source]
Implement the AbstractUnitOfWork method.
See rollback() docstring for details
- Return type:
None