pub struct SqlitePrimitiveStorage { /* private fields */ }Expand description
SQLite-based primitive storage implementation.
Uses a single table for persistent storage with a connection protected by Mutex.
Implementations§
Source§impl SqlitePrimitiveStorage
impl SqlitePrimitiveStorage
Sourcepub fn new(config: SqliteConfig) -> Self
pub fn new(config: SqliteConfig) -> Self
Create a new SQLite primitive storage with the given configuration.
Trait Implementations§
Source§impl Clone for SqlitePrimitiveStorage
impl Clone for SqlitePrimitiveStorage
Source§fn clone(&self) -> SqlitePrimitiveStorage
fn clone(&self) -> SqlitePrimitiveStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl TierStorage for SqlitePrimitiveStorage
impl TierStorage for SqlitePrimitiveStorage
Source§fn get(&self, key: &[u8]) -> Result<Option<CowVec<u8>>>
fn get(&self, key: &[u8]) -> Result<Option<CowVec<u8>>>
Get the value for a key, or None if not found.
Source§fn set(&self, entries: Vec<(CowVec<u8>, Option<CowVec<u8>>)>) -> Result<()>
fn set(&self, entries: Vec<(CowVec<u8>, Option<CowVec<u8>>)>) -> Result<()>
Write entries atomically. Read more
Source§fn range_next(
&self,
cursor: &mut RangeCursor,
start: Bound<&[u8]>,
end: Bound<&[u8]>,
batch_size: usize,
) -> Result<RangeBatch>
fn range_next( &self, cursor: &mut RangeCursor, start: Bound<&[u8]>, end: Bound<&[u8]>, batch_size: usize, ) -> Result<RangeBatch>
Fetch the next batch of entries in key order (descending). Read more
Source§fn range_rev_next(
&self,
cursor: &mut RangeCursor,
start: Bound<&[u8]>,
end: Bound<&[u8]>,
batch_size: usize,
) -> Result<RangeBatch>
fn range_rev_next( &self, cursor: &mut RangeCursor, start: Bound<&[u8]>, end: Bound<&[u8]>, batch_size: usize, ) -> Result<RangeBatch>
Fetch the next batch of entries in reverse key order (ascending). Read more
Source§fn clear_table(&self) -> Result<()>
fn clear_table(&self) -> Result<()>
Delete all entries in storage.
impl TierBackend for SqlitePrimitiveStorage
Auto Trait Implementations§
impl Freeze for SqlitePrimitiveStorage
impl !RefUnwindSafe for SqlitePrimitiveStorage
impl Send for SqlitePrimitiveStorage
impl Sync for SqlitePrimitiveStorage
impl Unpin for SqlitePrimitiveStorage
impl UnsafeUnpin for SqlitePrimitiveStorage
impl !UnwindSafe for SqlitePrimitiveStorage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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