pub struct SyncSqliteBackend { /* private fields */ }Expand description
Synchronous SQLite backend implementation
Implementations§
Source§impl SyncSqliteBackend
impl SyncSqliteBackend
Sourcepub fn new(path: impl AsRef<Path>) -> Result<Self, StorageError>
pub fn new(path: impl AsRef<Path>) -> Result<Self, StorageError>
Create or open a SQLite database at the given path
Sourcepub fn in_memory() -> Result<Self, StorageError>
pub fn in_memory() -> Result<Self, StorageError>
Create an in-memory database (for testing)
Trait Implementations§
Source§impl SyncStorageBackend for SyncSqliteBackend
Available on crate feature sqlite-storage only.
impl SyncStorageBackend for SyncSqliteBackend
Available on crate feature
sqlite-storage only.Source§fn save(&self, snapshot: &Snapshot) -> Result<String, StorageError>
fn save(&self, snapshot: &Snapshot) -> Result<String, StorageError>
Save a snapshot, return its ID
Source§fn save_decision(
&self,
decision: &DecisionSnapshot,
) -> Result<String, StorageError>
fn save_decision( &self, decision: &DecisionSnapshot, ) -> Result<String, StorageError>
Save a single decision snapshot
Source§fn load_decision(
&self,
decision_id: &str,
) -> Result<DecisionSnapshot, StorageError>
fn load_decision( &self, decision_id: &str, ) -> Result<DecisionSnapshot, StorageError>
Load a decision by ID
Source§fn query(&self, query: SnapshotQuery) -> Result<Vec<Snapshot>, StorageError>
fn query(&self, query: SnapshotQuery) -> Result<Vec<Snapshot>, StorageError>
Query snapshots with filters
Source§fn flush(&self) -> Result<FlushResult, StorageError>
fn flush(&self) -> Result<FlushResult, StorageError>
Flush pending writes (for batching backends)
Source§fn health_check(&self) -> Result<bool, StorageError>
fn health_check(&self) -> Result<bool, StorageError>
Check health/connectivity
Auto Trait Implementations§
impl Freeze for SyncSqliteBackend
impl RefUnwindSafe for SyncSqliteBackend
impl Send for SyncSqliteBackend
impl Sync for SyncSqliteBackend
impl Unpin for SyncSqliteBackend
impl UnwindSafe for SyncSqliteBackend
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