pub struct SqliteStore { /* private fields */ }Expand description
SQLite persistence store
Stores DDS samples in a SQLite database with efficient indexing.
Thread-safe via internal Mutex (SQLite Connection is not Sync).
§Schema
CREATE TABLE samples (
id INTEGER PRIMARY KEY AUTOINCREMENT,
topic TEXT NOT NULL,
type_name TEXT NOT NULL,
payload BLOB NOT NULL,
timestamp_ns INTEGER NOT NULL,
sequence INTEGER NOT NULL,
source_guid BLOB NOT NULL
);
CREATE INDEX idx_topic ON samples(topic);
CREATE INDEX idx_timestamp ON samples(timestamp_ns);Implementations§
Source§impl SqliteStore
impl SqliteStore
Trait Implementations§
Source§impl PersistenceStore for SqliteStore
impl PersistenceStore for SqliteStore
Source§fn query_range(
&self,
topic: &str,
start_ns: u64,
end_ns: u64,
) -> Result<Vec<Sample>>
fn query_range( &self, topic: &str, start_ns: u64, end_ns: u64, ) -> Result<Vec<Sample>>
Query samples within a time range Read more
Source§fn apply_retention(&self, topic: &str, keep_count: usize) -> Result<()>
fn apply_retention(&self, topic: &str, keep_count: usize) -> Result<()>
Delete old samples to enforce retention policy Read more
Source§fn apply_retention_policy(
&self,
topic: &str,
policy: &RetentionPolicy,
) -> Result<()>
fn apply_retention_policy( &self, topic: &str, policy: &RetentionPolicy, ) -> Result<()>
Apply retention policy with optional age/size constraints.
Auto Trait Implementations§
impl !Freeze for SqliteStore
impl RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
impl UnwindSafe for SqliteStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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