pub struct Sqlite { /* private fields */ }
Expand description
A Stash whose data is stored in a single file on disk. The format of this file is not specified and should not be relied upon. The only promise is stability. Any changes to the on-disk format will be accompanied by a clear migration path.
Implementations
Trait Implementations
sourceimpl Append for Sqlite
impl Append for Sqlite
sourcefn append_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn append_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Same as
append
, but does not consolidate batches.sourcefn append<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Atomically adds entries, seals, compacts, and consolidates multiple
collections. Read more
sourceimpl Stash for Sqlite
impl Stash for Sqlite
sourcefn since<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Antichain<Timestamp>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn since<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Antichain<Timestamp>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Reports the current since frontier.
sourcefn upper<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Antichain<Timestamp>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn upper<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Antichain<Timestamp>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Reports the current upper frontier.
sourcefn collection<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<StashCollection<K, V>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn collection<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<StashCollection<K, V>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Loads or creates the named collection. Read more
sourcefn collections<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<String>, StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn collections<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<String>, StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the names of the collections in the stash.
sourcefn iter<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Vec<((K, V), Timestamp, Diff)>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn iter<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Vec<((K, V), Timestamp, Diff)>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Iterates over all entries in the stash. Read more
sourcefn iter_key<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<Vec<(V, Timestamp, Diff)>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn iter_key<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<Vec<(V, Timestamp, Diff)>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Iterates over entries in the stash for the given key. Read more
sourcefn update_many<'life0, 'async_trait, K, V, I>(
&'life0 mut self,
collection: StashCollection<K, V>,
entries: I
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
I: IntoIterator<Item = ((K, V), Timestamp, Diff)> + Send,
I::IntoIter: Send,
K: 'async_trait,
V: 'async_trait,
I: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn update_many<'life0, 'async_trait, K, V, I>(
&'life0 mut self,
collection: StashCollection<K, V>,
entries: I
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
I: IntoIterator<Item = ((K, V), Timestamp, Diff)> + Send,
I::IntoIter: Send,
K: 'async_trait,
V: 'async_trait,
I: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Atomically adds multiple entries to the arrangement. Read more
sourcefn seal<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
new_upper: AntichainRef<'life1, Timestamp>
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn seal<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
new_upper: AntichainRef<'life1, Timestamp>
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Atomically advances the upper frontier to the specified value. Read more
sourcefn seal_batch<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
seals: &'life1 [(StashCollection<K, V>, Antichain<Timestamp>)]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn seal_batch<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
seals: &'life1 [(StashCollection<K, V>, Antichain<Timestamp>)]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Performs multiple seals at once, potentially in a more performant way than
performing the individual seals one by one. Read more
sourcefn compact<'a, 'async_trait, K, V>(
&'a mut self,
collection: StashCollection<K, V>,
new_since: AntichainRef<'a, Timestamp>
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
'a: 'async_trait,
K: 'async_trait,
V: 'async_trait,
Self: 'async_trait,
fn compact<'a, 'async_trait, K, V>(
&'a mut self,
collection: StashCollection<K, V>,
new_since: AntichainRef<'a, Timestamp>
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
'a: 'async_trait,
K: 'async_trait,
V: 'async_trait,
Self: 'async_trait,
Atomically advances the since frontier to the specified value. Read more
sourcefn compact_batch<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
compactions: &'life1 [(StashCollection<K, V>, Antichain<Timestamp>)]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn compact_batch<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
compactions: &'life1 [(StashCollection<K, V>, Antichain<Timestamp>)]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Performs multiple compactions at once, potentially in a more performant way than
performing the individual compactions one by one. Read more
sourcefn consolidate<'life0, 'async_trait>(
&'life0 mut self,
collection: Id
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn consolidate<'life0, 'async_trait>(
&'life0 mut self,
collection: Id
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Atomically consolidates entries less than the since frontier. Read more
sourcefn consolidate_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
collections: &'life1 [Id]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn consolidate_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
collections: &'life1 [Id]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Performs multiple consolidations at once, potentially in a more performant way than
performing the individual consolidations one by one. Read more
sourcefn confirm_leadership<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn confirm_leadership<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns
Ok
if this stash instance was the leader at some
point from the invocation of this method to the return of this
method. Otherwise, returns Err
. Read moresourcefn epoch(&self) -> Option<NonZeroI64>
fn epoch(&self) -> Option<NonZeroI64>
Returns the stash’s epoch number. If
Some
, it is a positive number that
increases with each start of a stash. Read moresourcefn peek_timestamp<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Timestamp, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn peek_timestamp<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Timestamp, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Returns the most recent timestamp at which sealed entries can be read.
sourcefn peek<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Vec<(K, V, Diff)>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn peek<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<Vec<(K, V, Diff)>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Returns the current value of sealed entries. Read more
sourcefn peek_one<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<K, V>, StashError>> + Send + 'async_trait>>where
K: Data + Hash,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn peek_one<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<K, V>, StashError>> + Send + 'async_trait>>where
K: Data + Hash,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Returns the current k,v pairs of sealed entries, erroring if there is more
than one entry for a given key or the multiplicity is not 1 for each key. Read more
sourcefn peek_key_one<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<Option<V>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn peek_key_one<'life0, 'life1, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<Option<V>, StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the current sealed value for the given key, erroring if there is
more than one entry for the key or its multiplicity is not 1. Read more
sourcefn update<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
data: (K, V),
time: Timestamp,
diff: Diff
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn update<'life0, 'async_trait, K, V>(
&'life0 mut self,
collection: StashCollection<K, V>,
data: (K, V),
time: Timestamp,
diff: Diff
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
K: Data,
V: Data,
K: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Atomically adds a single entry to the arrangement. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Sqlite
impl Send for Sqlite
impl !Sync for Sqlite
impl Unpin for Sqlite
impl !UnwindSafe for Sqlite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request