minos.aggregate.events.entries

Classes

EventEntry

Class that represents an entry (or row) on the event repository database which stores the root entity changes.

class EventEntry[source]

Bases: object

Class that represents an entry (or row) on the event repository database which stores the root entity changes.

__init__(uuid, name, version=None, data=bytes(), id=None, action=None, created_at=None, transaction_uuid=NULL_UUID)[source]
Parameters
uuid
name
version
data
id
action
created_at
transaction_uuid
classmethod from_event(event, *, transaction=None, **kwargs)[source]

Build a new instance from a RootEntity.

Parameters
  • event (Event) – The event.

  • transaction (Optional[TransactionEntry]) – Optional transaction.

  • kwargs – Additional named arguments.

Returns

A new EventEntry instance.

Return type

EventEntry

classmethod from_another(another, **kwargs)[source]

Build a new instance from another EventEntry.

Parameters
  • another (EventEntry) – The EventEntry.

  • kwargs – Additional named arguments.

Returns

A new EventEntry instance.

Return type

EventEntry

as_raw()[source]

Get a raw representation of the instance.

Returns

A dictionary in which the keys are attribute names and values the attribute contents.

Return type

dict[str, Any]

property type_: type[RootEntity]

Load the concrete RootEntity class.

Returns

A Type object.

property event: minos.aggregate.events.models.Event

Get the stored Event instance.

Returns

An Event instance.

property field_diff_container: minos.aggregate.events.fields.FieldDiffContainer

Get the stored field diff container.

Returns

A FieldDiffContainer instance.