pub struct SqlReadJournal { /* private fields */ }Implementations§
Source§impl SqlReadJournal
impl SqlReadJournal
pub fn new(journal: Arc<SqlJournal>) -> Self
pub async fn events_by_tag( &self, tag: &str, from_offset: u64, max: u64, ) -> Result<Vec<EventEnvelope>, JournalError>
Trait Implementations§
Source§impl ReadJournal for SqlReadJournal
impl ReadJournal for SqlReadJournal
Source§fn events_by_persistence_id<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn events_by_persistence_id<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Replay events for a single persistence id, sequence-number
bounded.
Source§fn current_events_by_persistence_id<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn current_events_by_persistence_id<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Snapshot variant of
Self::events_by_persistence_id —
default impl is identical (in-memory journals don’t tail).Source§fn events_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_tag: &'life1 str,
_offset: Offset,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn events_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_tag: &'life1 str,
_offset: Offset,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
All events with a given tag, returned in offset order.
Default impl is empty so backends without tag indexing don’t
silently mis-behave.
fn current_events_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
offset: Offset,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Distinct persistence ids known to the backend. Default impl
returns empty (backends without an id index opt in).
fn current_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for SqlReadJournal
impl !RefUnwindSafe for SqlReadJournal
impl Send for SqlReadJournal
impl Sync for SqlReadJournal
impl Unpin for SqlReadJournal
impl UnsafeUnpin for SqlReadJournal
impl !UnwindSafe for SqlReadJournal
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