minos.aggregate.snapshots.entries module¶
- class minos.aggregate.snapshots.entries.SnapshotEntry(aggregate_uuid, aggregate_name, version, schema=None, data=None, created_at=None, updated_at=None, transaction_uuid=UUID('00000000-0000-0000-0000-000000000000'))[source]¶
Bases:
objectMinos Snapshot Entry class.
Is the python object representation of a row in the
snapshotstorage system.- __init__(aggregate_uuid, aggregate_name, version, schema=None, data=None, created_at=None, updated_at=None, transaction_uuid=UUID('00000000-0000-0000-0000-000000000000'))[source]¶
- property aggregate_cls: Type[minos.aggregate.models.aggregates.Aggregate]¶
Load the concrete
Aggregateclass.- Return type
typing.Type[minos.aggregate.models.aggregates.Aggregate]- Returns
A
Typeobject.
- aggregate_name¶
- aggregate_uuid¶
- as_raw()[source]¶
Get a raw representation of the instance.
- Return type
dict[str,typing.Any]- Returns
A dictionary in which the keys are attribute names and values the attribute contents.
- build_aggregate(**kwargs)[source]¶
Rebuild the stored
Aggregateobject instance from the internal state.- Parameters
kwargs – Additional named arguments.
- Return type
- Returns
A
Aggregateinstance.
- created_at¶
- data¶
- property encoded_data: Optional[str]¶
Get the encoded data if available.
- Return type
typing.Optional[str]- Returns
A
strinstance orNone.
- property encoded_schema: Optional[bytes]¶
Get the encoded schema if available.
- Return type
typing.Optional[bytes]- Returns
A
bytesinstance orNone.
- classmethod from_aggregate(aggregate, **kwargs)[source]¶
Build a new instance from an
Aggregate.- Parameters
aggregate (
minos.aggregate.models.aggregates.Aggregate) – The aggregate instance.- Return type
- Returns
A new
MinosSnapshotEntryinstance.
- classmethod from_event_entry(entry)[source]¶
Build a new
SnapshotEntryfrom a deletion event.- Parameters
entry (
minos.aggregate.events.entries.EventEntry) – The event entry containing the delete information.- Return type
- Returns
A new
SnapshotEntryinstance.
- schema¶
- transaction_uuid¶
- updated_at¶
- version¶