Skip to main content

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
Fluent query builder for history records.
HistoryStats
Aggregate statistics for history data.
ImportResult
Result of an import operation.
ReadingQuery
Fluent query builder for current readings.
Store
SQLite-based store for Aranet sensor data.
StoredDevice
A device stored in the database with metadata and tracking information.
StoredHistoryRecord
A historical sensor reading downloaded from device memory.
StoredReading
A current sensor reading stored in the database.
SyncState
Tracks incremental sync progress for a device’s history.

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.