Crate persist_es
source · [−]Expand description
persist-es
Common persistence logic used for database-backed event stores for cqrs-es.
Things that could be helpful:
- User guide along with an introduction to CQRS and event sourcing.
- Demo application using the warp http server.
- Change log
Structs
Holds context for the pure event store implementation PostgresStore.
This is only used internally within the EventStore
.
A simple query and view repository. This is used both to act as a Query
for processing events
and to return materialized views.
Storage engine using a database backing.
This is an event-sourced EventStore
, meaning it uses events as the
primary source of truth for the state of the aggregate.
Storage engine using a database backing.
This is an snapshot-sourced EventStore
, meaning it uses the serialized aggregate as the
primary source of truth for the state of the aggregate.
A data structure maintaining context when updating views.
This upcasts any event that has the same event_type
and an event_version
that is less than the
version configured on the upcaster.
A serialized version of an event with metadata. Used by repositories to store and load events from a database.
A serialized version of a snapshot. Used by repositories to store and load snapshots from a database.
Holds context for the snapshot-sourced implementation PostgresSnapshotStore.
This is only used internally within the EventStore
.
Enums
Errors for implementations of a persistent event store.
Traits
Used to upcast and event from an older type or version to the current form. This is needed to modify the structure of events older versions are already persisted.
Handles the database access needed for operation of a PersistedSnapshotStore.
Handles the database access needed for a GenericQuery.