Struct postgres_es::PostgresStore[][src]

pub struct PostgresStore<A: Aggregate + Send + Sync> { /* fields omitted */ }
Expand description

Storage engine using a Postgres database backing. This is an event-sourced EventStore, meaning it uses events as the primary source of truth for the state of the aggregate.

For a snapshot-based EventStore see PostgresSnapshotStore.

Implementations

Creates a new PostgresStore from the provided database connection, an EventStore used for configuring a new cqrs framework.

let store = PostgresStore::<MyAggregate>::new(pool);
let cqrs = CqrsFramework::new(store, vec![]);

Trait Implementations

Provides the current state of an aggregate along with surrounding context. This is used by the CqrsFramework when loading an aggregate in order to handle incoming commands. Read more

Load all events for a particular aggregate_id

Load aggregate at current state

Commit new events

Method to wrap a set of events with the additional metadata needed for persistence and publishing

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.