Trait cqrs_es2_store::IQueryStore[][src]

pub trait IQueryStore<C: ICommand, E: IEvent, A: IAggregate<C, E>, Q: IQuery<C, E>>: IEventDispatcher<C, E> {
    fn save_query(
        &mut self,
        context: QueryContext<C, E, Q>
    ) -> Result<(), Error>;
fn load_query(
        &mut self,
        aggregate_id: &str
    ) -> Result<QueryContext<C, E, Q>, Error>; fn dispatch_events(
        &mut self,
        aggregate_id: &str,
        events: &[EventContext<C, E>]
    ) -> Result<(), Error> { ... } }
Expand description

The abstract central source for loading and committing queries.

Required methods

saves the updated query

loads the most recent query

Provided methods

used as a default implementation for dispatching

Implementors