All notable changes to this crate are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
.persist()takes no name (#426). History is stored under the record key, sorecord.queryreturns the key astopicand WebSocket clients read history with the same grants as live values. Rows already written under a custom name stay as they are; nothing new is written under them.- The
with_persistencequery handler returns typed rows (#429), matching the newQueryHandlerFnsignature inaimdb-core. Replies no longer carrytotal. - The query handler no longer applies a default limit (#430). It uses the
resolved
QueryHandlerParams::limitfromaimdb-core, which defaults to 1 as before.
0.3.0 - 2026-11-03
- Requires
aimdb-core3.0 (#326). The.persist()tap reads theStamped<T>values core 3.0 buffers carry and stores.value. The backend still records its own persist time, not the write stamp (design 058 §5.1).
logfeature (#365), forwarding operational events through thelogfacade. It can be enabled together withtracing.
- Operational failures are reported through core's
log_*!macros (#365): a missing backend, serialize and store failures, retention cleanup failures, and rows skipped byquery_*because they fail to deserialise.tracingnow enablesaimdb-core/tracinginstead of depending ontracingdirectly. Log targets are unchanged (aimdb_persistence::ext,::builder_ext,::query_ext). With neithertracingnorlog, a retention cleanup failure is printed to stderr.
0.2.0 - 2026-09-18
with_persistence's registeredQueryHandlerFnreturns the sharedrecord.queryshape{"records": [{topic, payload, ts}, …], "total": N}(rows sorted bytsascending) instead of{values: [{record, value, stored_at}], count}, so every transport shares one query vocabulary.PersistenceBackend::querypatterns are MQTT-style, the grammar subscriptions already use:*covers exactly one segment and#zero or more, over dot-separated record keys. Previously the contract was a prefix glob ("accuracy::*"), so one pattern meant different things live and historically — and a query could return records outside it. Newpattern::{literal_prefix, prefix_upper_bound}build the index range a backend narrows with, andtopic_matchesis re-exported so it decides with the same implementation core uses. Backends matching*themselves must switch to that pair.
- Issue #131:
RecordRegistrarPersistExt/AimDbBuilderPersistExt/AimDbQueryExtare non-generic over the runtime (they extendRecordRegistrar<'a, T>/AimDbBuilder/AimDb); the retention-cleanupon_starttask receivesRuntimeContextand sleeps viactx.time().sleep_secs(...). RecordRegistrarPersistExt::persisttakes a fresh borrow (Issue #130, design 034 Phase 2).fn persist(&mut self, …) -> &mut RecordRegistrar<'a, T, R>(was&'a mut self -> &'a mut …), following core's registrar lifetime fix —persist()no longer borrows the registrar for its entire remaining lifetime. Call sites compile unchanged.- All
R: Spawnbounds replaced withR: RuntimeAdapteron public traits (AimDbBuilderPersistExt,RecordRegistrarPersistExt,AimDbQueryExt) and internal helpers (Issue #88). No behavioural change —aimdb-persistencenever calledruntime.spawndirectly, the bound was just propagated.
0.1.1 - 2026-05-22
- Bumped
aimdb-coredependency to1.1.0andaimdb-executorto0.2.0
0.1.0 — 2026-02-21
PersistenceBackendtrait — pluggable async storage interface withstore,query,cleanup, and an optionalinitializehook (backend.rs)StoredValue— typed record returned byquery:record_name,value: serde_json::Value,stored_at: u64(Unix ms)QueryParams—limit_per_record: Option<usize>,start_time: Option<u64>,end_time: Option<u64>;Nonelimit means "return all matching rows" (no implicit truncation)AimDbBuilderPersistExttrait — adds.with_persistence(backend, retention)toAimDbBuilder<R>; storesPersistenceStatein the builder'sExtensionsTypeMap and registers a 24-hour retention cleanup task viaon_start()PersistenceState—backend: Arc<dyn PersistenceBackend>+retention_ms: u64; stored inExtensionsand shared between the subscriber and query-time codeRecordRegistrarPersistExttrait — adds.persist(record_name)toRecordRegistrar<T, R>; acceptsimpl Into<String>for ergonomic call sites; spawns atap_rawsubscriber that serialises eachTto JSON and writes it to the backendAimDbQueryExttrait — addsquery_latest,query_range, andquery_rawtoAimDb<R>:query_latest<T>(&self, pattern, limit) -> Vec<T>— typed, limit per recordquery_range<T>(&self, pattern, start_ms, end_ms, limit_per_record) -> Vec<T>— typed, time range with optional per-record limit (None= all rows)query_raw(&self, pattern, params) -> Vec<StoredValue>— untyped escape hatch used by the AimXrecord.queryprotocol handler
PersistenceError—NotConfigured,Backend(String),BackendShutdown,Serialization(serde_json::Error)tracingfeature — optional structured logging for subscriber events, cleanup results, and query-time deserialisation failures- Cleanup observability — when the
tracingfeature is disabled, cleanup errors are printed tostderrviaeprintln!so operators are never silently left with unbounded database growth
- No coupling to
aimdb-corepersistence types — persistence state flows through theExtensionsTypeMap;aimdb-corecarries only a type-erasedQueryHandlerFnfor the AimX protocol delegation - Runtime-agnostic subscriber —
RecordRegistrarPersistExtrequires onlyT: Serialize;.with_remote_access()is not needed StoredValue.valuemoved, not cloned —filter_mapinAimDbQueryExtdestructuresStoredValueto move theValueintofrom_value()directly