minos.plugins.aiopg.factories.aggregate.snapshots.impl
Classes
Aiopg Snapshot Database Operation Factory class. |
- class AiopgSnapshotDatabaseOperationFactory[source]
Bases:
SnapshotDatabaseOperationFactoryAiopg Snapshot Database Operation Factory class.
- build_create()[source]
Build the database operation to create the snapshot table.
- Returns
A
DatabaseOperationinstance.- Return type
- build_delete(transaction_uuids)[source]
Build the database operation to delete rows by transaction identifiers.
- build_submit(uuid, name, version, schema, data, created_at, updated_at, transaction_uuid)[source]
Build the insert database operation.
- Parameters
uuid (UUID) – The identifier of the entity.
name (str) – The name of the entity.
version (int) – The version of the entity.
schema (bytes) – The schema of the entity.
created_at (datetime) – The creation datetime.
updated_at (datetime) – The last update datetime.
transaction_uuid (UUID) – The transaction identifier.
- Returns
A
DatabaseOperationinstance.- Return type
- build_query(name, condition, ordering, limit, transaction_uuids, exclude_deleted)[source]
Build the query database operation.
- Parameters
name (str) – Class name of the
RootEntity.condition (_Condition) – The condition that must be satisfied by the
RootEntityinstances.ordering (Optional[_Ordering]) – Optional argument to return the instance with specific ordering strategy. The default behaviour is to retrieve them without any order pattern.
limit (Optional[int]) – Optional argument to return only a subset of instances. The default behaviour is to return all the instances that meet the given condition.
transaction_uuids (Iterable[UUID]) – The transaction within the operation is performed. If not any value is provided, then the transaction is extracted from the context var. If not any transaction is being scoped then the query is performed to the global snapshot.
exclude_deleted (bool) – If
True, deletedRootEntityentries are included, otherwise deletedRootEntityentries are filtered.
- Returns
A
DatabaseOperationinstance.- Return type
- build_submit_offset(value)[source]
Build the database operation to store the offset.
- Parameters
value (int) – The value to be stored as the new offset.
- Returns
A
DatabaseOperationinstance.- Return type