minos.aggregate.transactions.repositories.memory
Classes
In Memory Transaction Repository class. |
- class InMemoryTransactionRepository[source]
Bases:
TransactionRepository
In Memory Transaction Repository class.
- async destroy()
Destroy miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- classmethod from_config(config=None, **kwargs)
Build a new instance from config.
- Parameters
config (Optional[Union[Config, Path]]) – Config instance. If None is provided, default config is chosen.
kwargs – Additional named arguments.
- Returns
A instance of the called class.
- Return type
S
- async get(uuid, **kwargs)
Get a
TransactionEntry
from its identifier.- Parameters
uuid (UUID) – Identifier of the
RootEntity
.kwargs – Additional named arguments.
- Returns
The
TransactionEntry
instance.- Return type
- async select(uuid=None, uuid_ne=None, uuid_in=None, destination_uuid=None, status=None, status_in=None, event_offset=None, event_offset_lt=None, event_offset_gt=None, event_offset_le=None, event_offset_ge=None, updated_at=None, updated_at_lt=None, updated_at_gt=None, updated_at_le=None, updated_at_ge=None, **kwargs)
Get a transaction from the repository.
- Parameters
uuid (Optional[UUID]) – Transaction identifier equal to the given value.
uuid_ne (Optional[UUID]) – Transaction identifier not equal to the given value
uuid_in (Optional[tuple[uuid.UUID, ...]]) – Transaction identifier within the given values.
destination_uuid (Optional[UUID]) – Destination Transaction identifier equal to the given value.
status (Optional[TransactionStatus]) – Transaction status equal to the given value.
status_in (Optional[tuple[str, ...]]) – Transaction status within the given values
event_offset (Optional[int]) – Event offset equal to the given value.
event_offset_lt (Optional[int]) – Event Offset lower than the given value
event_offset_gt (Optional[int]) – Event Offset greater than the given value
event_offset_le (Optional[int]) – Event Offset lower or equal to the given value
event_offset_ge (Optional[int]) – Event Offset greater or equal to the given value
updated_at (Optional[datetime]) – Updated at equal to the given value.
updated_at_lt (Optional[datetime]) – Updated at lower than the given value.
updated_at_gt (Optional[datetime]) – Updated at greater than the given value.
updated_at_le (Optional[datetime]) – Updated at lower or equal to the given value.
updated_at_ge (Optional[datetime]) – Updated at greater or equal to the given value.
kwargs – Additional named arguments.
- Returns
An asynchronous iterator.
- Return type
- async setup()
Setup miscellaneous repository things.
- Returns
This method does not return anything.
- Return type
None
- async submit(transaction)
Submit a new or updated transaction to store it on the repository.
- Parameters
transaction (TransactionEntry) – The transaction to be stored.
- Returns
This method does not return anything.
- Return type