Data model¶
Storage¶
- File:
rainlog.sqlite(constantDEFAULT_DB_FILE_NAMEinrainlog) - Default location:
~/.local/share/rainlog/rainlog.sqlite(constantDEFAULT_DB_DIRinrainlog) - Location: The directory given by
--db-dir(default:~/.local/share/rainlog/). - Engine: SQLite3, table created if missing:
datecolumn: Unix timestamp (seconds) for the end of the 24-hour period, i.e. the day key after normalising to 09:00:00 local time with no fractional seconds (seeadd/changein the source).
Units¶
raincolumn: Millimetres (mm).
Semantics¶
- One row per logical day (unique
date/ bucket). get_rain(used bygraph) aggregates raw rows according toGraphGrouping(daily,weekly,monthly,yearly,annually).get_rainy-days(used byrainy-days) counts days withrain > 0inside each aggregated bucket.
Time zone¶
Bucket boundaries use the host's local time zone at runtime (LOCAL_TZ in rainlog).