Expand description
§aimdb-persistence-sqlite
SQLite persistence backend for AimDB.
Owns a dedicated OS thread that holds the rusqlite::Connection. All async
callers send [DbCommand] messages via std::sync::mpsc::sync_channel and
await a tokio::sync::oneshot reply. The async executor is never blocked;
the writer thread is never awaited.
Runtime requirement: This crate requires a Tokio runtime for the
oneshot reply channel. Do not use SqliteBackend with the Embassy
adapter — it will not compile without a Tokio executor.
§Example
ⓘ
use aimdb_persistence_sqlite::SqliteBackend;
use std::sync::Arc;
let backend = Arc::new(SqliteBackend::new("./data/history.db")?);Structs§
- Sqlite
Backend - SQLite persistence backend.