Expand description
Local data persistence for Aranet sensor readings.
This crate provides SQLite-based storage for Aranet sensor data, enabling offline access, history caching, and efficient queries.
§Features
- Store current readings with timestamps
- Cache history records (avoid re-downloading from device)
- Incremental sync tracking per device
- Query by device, time range, with pagination
- Export/import support
§Example
use aranet_store::{Store, ReadingQuery};
let store = Store::open_default()?;
// Query recent readings
let query = ReadingQuery::new()
.device("Aranet4 17C3C")
.limit(10);
let readings = store.query_readings(&query)?;Structs§
- History
Aggregates - Aggregate values for a single metric set.
- History
Query - Query builder for history records.
- History
Stats - Aggregate statistics for history data.
- Import
Result - Result of an import operation.
- Reading
Query - Query builder for readings.
- Store
- SQLite-based store for Aranet sensor data.
- Stored
Device - A device stored in the database.
- Stored
History Record - A history record stored in the database.
- Stored
Reading - A reading stored in the database.
- Sync
State - Sync state for a device.
Enums§
- Error
- Errors that can occur in aranet-store.
Functions§
- default_
db_ path - Default database path following platform conventions.
Type Aliases§
- Result
- Result type for aranet-store operations.