minos.aggregate.snapshots.entries
Classes
Minos Snapshot Entry class. |
- class SnapshotEntry[source]
Bases:
objectMinos Snapshot Entry class.
Is the python object representation of a row in the
snapshotstorage system.- __init__(uuid, name, version, schema=None, data=None, created_at=None, updated_at=None, transaction_uuid=NULL_UUID)[source]
- classmethod from_root_entity(instance, **kwargs)[source]
Build a new instance from a
RootEntity.- Parameters
instance (RootEntity) – The
RootEntityinstance.- Returns
A new
SnapshotEntryinstance.- Return type
- classmethod from_event_entry(entry)[source]
Build a new
SnapshotEntryfrom a deletion event.- Parameters
entry (EventEntry) – The event entry containing the delete information.
- Returns
A new
SnapshotEntryinstance.- Return type
- property encoded_schema: Optional[bytes]
Get the encoded schema if available.
- Returns
A
bytesinstance orNone.
- property encoded_data: Optional[str]
Get the encoded data if available.
- Returns
A
strinstance orNone.
- build(**kwargs)[source]
Rebuild the stored
RootEntityobject instance from the internal state.- Parameters
kwargs – Additional named arguments.
- Returns
A
RootEntityinstance.- Return type
- property type_: type[RootEntity]
Load the concrete
RootEntityclass.- Returns
A
Typeobject.