pub struct SqlEventStore { /* private fields */ }Expand description
An EventStore backed by SQLite tables.
Implementations§
Source§impl SqlEventStore
impl SqlEventStore
Sourcepub fn new_scoped(
pool: Arc<ConnectionPool>,
is_file_backed: bool,
namespace: impl Into<String>,
) -> Self
pub fn new_scoped( pool: Arc<ConnectionPool>, is_file_backed: bool, namespace: impl Into<String>, ) -> Self
Create a new store scoped to one namespace.
Trait Implementations§
Source§impl EventStore for SqlEventStore
impl EventStore for SqlEventStore
Source§fn append_event<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_event<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append a single event to the log.
Source§fn append_events<'life0, 'async_trait>(
&'life0 self,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<BatchWriteSummary, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_events<'life0, 'async_trait>(
&'life0 self,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<BatchWriteSummary, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append a batch of events to the log.
Source§fn get_event<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Event>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_event<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Event>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch an event by UUID, returning
None if absent.Source§fn query_events<'life0, 'async_trait>(
&'life0 self,
filter: EventFilter,
page: PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Event>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_events<'life0, 'async_trait>(
&'life0 self,
filter: EventFilter,
page: PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Event>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query events matching a filter with pagination.
Source§fn count_events<'life0, 'async_trait>(
&'life0 self,
filter: EventFilter,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_events<'life0, 'async_trait>(
&'life0 self,
filter: EventFilter,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Count events matching a filter.
Auto Trait Implementations§
impl !RefUnwindSafe for SqlEventStore
impl !UnwindSafe for SqlEventStore
impl Freeze for SqlEventStore
impl Send for SqlEventStore
impl Sync for SqlEventStore
impl Unpin for SqlEventStore
impl UnsafeUnpin for SqlEventStore
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
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