Struct postgres_es::PostgresEventRepository [−][src]
pub struct PostgresEventRepository { /* fields omitted */ }
Expand description
A snapshot backed event repository for use in backing a PersistedSnapshotStore
.
Implementations
Trait Implementations
fn get_events<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
aggregate_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<SerializedEvent>, PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_events<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
aggregate_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<SerializedEvent>, PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns all events for a single aggregate instance.
fn get_last_events<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
aggregate_id: &'life1 str,
number_events: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<SerializedEvent>, PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_last_events<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
aggregate_id: &'life1 str,
number_events: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<SerializedEvent>, PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the last events for a single aggregate instance.
fn get_snapshot<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
aggregate_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<SerializedSnapshot>, PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_snapshot<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
aggregate_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<SerializedSnapshot>, PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the current snapshot for an aggregate instance.
fn persist<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
events: &'life1 [SerializedEvent],
snapshot_update: Option<(String, Value, usize)>
) -> Pin<Box<dyn Future<Output = Result<(), PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn persist<'life0, 'life1, 'async_trait, A: Aggregate>(
&'life0 self,
events: &'life1 [SerializedEvent],
snapshot_update: Option<(String, Value, usize)>
) -> Pin<Box<dyn Future<Output = Result<(), PersistenceError>> + Send + 'async_trait>> where
A: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Commits the updated aggregate and accompanying events.