Struct postgres_es::GenericQueryRepository [−][src]
Expand description
This provides a simple query repository that can be used both to return deserialized views and to act as a query processor.
Implementations
impl<V, A> GenericQueryRepository<V, A> where
V: Query<A>,
A: Aggregate,
[src]
impl<V, A> GenericQueryRepository<V, A> where
V: Query<A>,
A: Aggregate,
[src]#[must_use]pub fn new(query_name: &str, conn: Connection) -> Self
[src]
#[must_use]pub fn new(query_name: &str, conn: Connection) -> Self
[src]Creates a new GenericQueryRepository
that will store its’ views in the table named
identically to the query_name
value provided. This table should be created by the user
previously (see /db/init.sql
).
pub fn with_error_handler(&mut self, error_handler: Box<dyn Fn(AggregateError)>)
[src]
pub fn with_error_handler(&mut self, error_handler: Box<dyn Fn(AggregateError)>)
[src]Since inbound views cannot
pub fn apply_events(&self, query_instance_id: &str, events: &[EventEnvelope<A>])
[src]
pub fn apply_events(&self, query_instance_id: &str, events: &[EventEnvelope<A>])
[src]Used to apply committed events to a view.
Trait Implementations
impl<Q, A> QueryProcessor<A> for GenericQueryRepository<Q, A> where
Q: Query<A>,
A: Aggregate,
[src]
impl<Q, A> QueryProcessor<A> for GenericQueryRepository<Q, A> where
Q: Query<A>,
A: Aggregate,
[src]Auto Trait Implementations
impl<V, A> !RefUnwindSafe for GenericQueryRepository<V, A>
impl<V, A> !Send for GenericQueryRepository<V, A>
impl<V, A> !Sync for GenericQueryRepository<V, A>
impl<V, A> Unpin for GenericQueryRepository<V, A> where
A: Unpin,
V: Unpin,
A: Unpin,
V: Unpin,
impl<V, A> !UnwindSafe for GenericQueryRepository<V, A>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self