Crate aranet_store

Crate aranet_store 

Source
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§

HistoryAggregates
Aggregate values for a single metric set.
HistoryQuery
Query builder for history records.
HistoryStats
Aggregate statistics for history data.
ImportResult
Result of an import operation.
ReadingQuery
Query builder for readings.
Store
SQLite-based store for Aranet sensor data.
StoredDevice
A device stored in the database.
StoredHistoryRecord
A history record stored in the database.
StoredReading
A reading stored in the database.
SyncState
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.