Next: , Previous: , Up: STCA Parameters Plugin   [Contents]


5 Persistence

The database schema is:

CREATE TABLE IF NOT EXISTS parameters (
  name TEXT PRIMARY KEY NOT NULL,
  value REAL NOT NULL
);

Descriptions are not stored in the database; they always come from the XML configuration.

On start:

  1. Open or create the file at db-path.
  2. Seed missing names with their XML defaults (INSERT OR IGNORE).
  3. Delete rows whose names are no longer present in the configuration.

Effective value for emit and HTTP reads is the stored row when present, otherwise the configured default (after a successful seed, every declared name has a row).