pub struct EventStore { /* private fields */ }Implementations§
Source§impl EventStore
impl EventStore
pub fn open( path: PathBuf, encryptor: Option<Encryptor>, worker_id: u16, ) -> Result<Self>
pub fn open_read_only( path: PathBuf, encryptor: Option<Encryptor>, ) -> Result<Self>
pub fn storage_usage_bytes(&self) -> Result<u64>
pub fn counts(&self) -> Result<StoreCounts>
pub fn prepare_payload_from_patch( &self, aggregate_type: &str, aggregate_id: &str, patch_value: &Value, ) -> Result<Value>
pub fn append(&self, input: AppendEvent) -> Result<EventRecord>
pub fn append_imported_event(&self, record: EventRecord) -> Result<()>
pub fn transaction(&self) -> Result<Transaction<'_>>
pub fn get_aggregate_state( &self, aggregate_type: &str, aggregate_id: &str, ) -> Result<AggregateState>
pub fn parse_timestamp_cursor( &self, raw: &str, kind: TimestampIndexKind, descending: bool, ) -> Result<AggregateCursor>
pub fn list_events( &self, aggregate_type: &str, aggregate_id: &str, ) -> Result<Vec<EventRecord>>
pub fn merkle_root_at( &self, aggregate_type: &str, aggregate_id: &str, version: u64, ) -> Result<Option<String>>
pub fn event_hashes( &self, aggregate_type: &str, aggregate_id: &str, ) -> Result<Option<Vec<String>>>
pub fn event_by_version( &self, aggregate_type: &str, aggregate_id: &str, version: u64, ) -> Result<Option<EventRecord>>
pub fn list_events_paginated( &self, aggregate_type: &str, aggregate_id: &str, skip: usize, take: Option<usize>, ) -> Result<Vec<EventRecord>>
pub fn events_after( &self, aggregate_type: &str, aggregate_id: &str, from_version: u64, limit: Option<usize>, ) -> Result<Vec<EventRecord>>
pub fn events_paginated( &self, scope: EventQueryScope<'_>, archive_scope: EventArchiveScope, skip: usize, take: Option<usize>, sort: Option<&[EventSort]>, filter: Option<&FilterExpr>, ) -> Result<Vec<EventRecord>>
pub fn find_event_by_id( &self, event_id: SnowflakeId, ) -> Result<Option<EventRecord>>
pub fn aggregate_version( &self, aggregate_type: &str, aggregate_id: &str, ) -> Result<Option<u64>>
pub fn list_aggregate_ids(&self, aggregate_type: &str) -> Result<Vec<String>>
pub fn verify(&self, aggregate_type: &str, aggregate_id: &str) -> Result<String>
pub fn create_snapshot( &self, aggregate_type: &str, aggregate_id: &str, comment: Option<String>, ) -> Result<SnapshotRecord>
pub fn list_snapshots( &self, aggregate_type: Option<&str>, aggregate_id: Option<&str>, version: Option<u64>, ) -> Result<Vec<SnapshotRecord>>
pub fn find_snapshot_by_id( &self, snapshot_id: SnowflakeId, ) -> Result<Option<SnapshotRecord>>
pub fn set_archive( &self, aggregate_type: &str, aggregate_id: &str, archived: bool, comment: Option<String>, ) -> Result<AggregateState>
pub fn aggregates(&self) -> Vec<AggregateState>
pub fn aggregates_paginated( &self, skip: usize, take: Option<usize>, ) -> Vec<AggregateState>
pub fn aggregates_paginated_with_transform<F>( &self, skip: usize, take: Option<usize>, sort: Option<&[AggregateSort]>, scope: AggregateQueryScope, cursor: Option<&AggregateCursor>, transform: F, ) -> Vec<AggregateState>
pub fn aggregates_paginated_without_state<F>( &self, skip: usize, take: Option<usize>, sort: Option<&[AggregateSort]>, scope: AggregateQueryScope, cursor: Option<&AggregateCursor>, transform: F, ) -> Vec<AggregateState>
pub fn aggregates_page_with_transform<F>( &self, cursor: Option<&AggregateCursor>, take: usize, scope: AggregateQueryScope, include_state: bool, transform: F, ) -> Result<(Vec<AggregateState>, Option<AggregateCursor>)>
pub fn aggregates_page_without_state<F>( &self, cursor: Option<&AggregateCursor>, take: usize, scope: AggregateQueryScope, transform: F, ) -> Result<(Vec<AggregateState>, Option<AggregateCursor>)>
pub fn aggregates_page( &self, cursor: Option<&AggregateCursor>, take: usize, scope: AggregateQueryScope, ) -> Result<(Vec<AggregateState>, Option<AggregateCursor>)>
pub fn events_page( &self, scope: EventQueryScope<'_>, archive_scope: EventArchiveScope, cursor: Option<&EventCursor>, take: usize, filter: Option<&FilterExpr>, ) -> Result<(Vec<EventRecord>, Option<EventCursor>)>
pub fn aggregate_positions(&self) -> Result<Vec<AggregatePositionEntry>>
pub fn create_aggregate( &self, aggregate_type: &str, aggregate_id: &str, ) -> Result<()>
pub fn remove_aggregate( &self, aggregate_type: &str, aggregate_id: &str, ) -> Result<()>
pub fn update_reference_index( &self, tenant: &str, aggregate_type: &str, aggregate_id: &str, references: &[(String, String)], ) -> Result<()>
pub fn clear_reference_index( &self, tenant: &str, aggregate_type: &str, aggregate_id: &str, ) -> Result<()>
pub fn referrers_for( &self, tenant: &str, target: &str, ) -> Result<Vec<(String, String, String)>>
pub fn referrers_for_any_tenant( &self, target: &str, ) -> Result<Vec<(String, String, String, String)>>
Auto Trait Implementations§
impl !Freeze for EventStore
impl !RefUnwindSafe for EventStore
impl Send for EventStore
impl Sync for EventStore
impl Unpin for EventStore
impl UnsafeUnpin for EventStore
impl UnwindSafe for EventStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more