Trait persist_es::ViewRepository [−][src]
pub trait ViewRepository<V, A>: Send + Sync where
V: View<A>,
A: Aggregate, {
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
query_instance_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<(V, QueryContext)>, PersistenceError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn update_view<'life0, 'async_trait>(
&'life0 self,
view: V,
context: QueryContext
) -> Pin<Box<dyn Future<Output = Result<(), PersistenceError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Handles the database access needed for a GenericQuery.
Required methods
Returns the current view instance.
fn update_view<'life0, 'async_trait>(
&'life0 self,
view: V,
context: QueryContext
) -> Pin<Box<dyn Future<Output = Result<(), PersistenceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn update_view<'life0, 'async_trait>(
&'life0 self,
view: V,
context: QueryContext
) -> Pin<Box<dyn Future<Output = Result<(), PersistenceError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Updates the view instance.