All notable changes to this crate are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 — 2026-02-21
SqliteBackend—Clone-able handle to a dedicated SQLite writer thread- Construction via
SqliteBackend::new(path): opens or creates the database, enables WAL journal mode, applies schema, then spawns the"aimdb-sqlite"OS thread — all synchronously, so no Tokio runtime is needed at build time CloneisO(1): clones only theSyncSender<DbCommand>handle; the writer thread shuts down when all clones are dropped
- Construction via
- Schema — single
record_historytable with(id, record_name, value_json, stored_at); composite index on(record_name, stored_at DESC)for efficient range and top-N queries - WAL mode —
PRAGMA journal_mode = WALallows concurrent readers while a single writer proceeds DbCommandactor model —Store,Query,Cleanupcommands sent viampsc::sync_channel(64); each carries atokio::sync::oneshotreply sender so the async callerawaits without blocking the executorstore(record_name, value, timestamp)— serialisesserde_json::Valueto text and INSERTs intorecord_historyquery(pattern, params)—WITH ranked AS (… ROW_NUMBER() OVER (PARTITION BY record_name …))window-function query supporting:*wildcard patterns (mapped to SQLLIKE … ESCAPE '\\')- Optional time-range bounds (
start_time,end_time) - Optional per-record limit (
limit_per_record: None→ no truncation)
cleanup(older_than)—DELETE … WHERE stored_at < ?with row-count return; called by the retention task registered viawith_persistence()sanitize_patternhelper — escapes SQLLIKEmetacharacters (%,_,\) before mapping the AimDB*wildcard to%tracingfeature — optionaltracing::warn!for corrupted JSON rows encountered during query