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
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) + Send + Sync + 'static>
)
pub fn with_error_handler(
&mut self,
error_handler: Box<dyn Fn(AggregateError) + Send + Sync + 'static>
)
Allows the user to apply a custom error handler to the query. Queries should never cause errors, but programming errors or other technical problems could and this is where the user should log or otherwise register the issue.
Used to apply committed events to a view.