minos.aggregate.snapshots.entries
Classes
Minos Snapshot Entry class. |
- class SnapshotEntry[source]
Bases:
object
Minos Snapshot Entry class.
Is the python object representation of a row in the
snapshot
storage 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
RootEntity
instance.- Returns
A new
SnapshotEntry
instance.- Return type
- classmethod from_event_entry(entry)[source]
Build a new
SnapshotEntry
from a deletion event.- Parameters
entry (EventEntry) – The event entry containing the delete information.
- Returns
A new
SnapshotEntry
instance.- Return type
- property encoded_schema: Optional[bytes]
Get the encoded schema if available.
- Returns
A
bytes
instance orNone
.
- property encoded_data: Optional[str]
Get the encoded data if available.
- Returns
A
str
instance orNone
.
- build(**kwargs)[source]
Rebuild the stored
RootEntity
object instance from the internal state.- Parameters
kwargs – Additional named arguments.
- Returns
A
RootEntity
instance.- Return type
- property type_: type[RootEntity]
Load the concrete
RootEntity
class.- Returns
A
Type
object.