Expand description
SQLite primitives (sqlite.mjs): readers open read-only — the contract
every supercode reader keeps over a live store — and writers create fresh
files. Rows are read as JSON objects so the codecs see the same shapes the
Node package saw.
Enums§
- Param
- A parameter value for
write_table.
Functions§
- read_
rows - Every row of
sqlas a JSON object keyed by column name;Nonewhen the file does not exist. - replace_
rows - Replace one table’s rows in place, inside a store other writers share (a Hermes home’s
state.db): create the table when absent (ddl), add any columncolumnsnames that it lacks (Hermes’s own schema reconcile only ever adds columns), delete the rowsdeleteselects and insertrows, in one transaction. Every other table in the file is left as it is. - table_
exists - Whether
tableexists in the store atpath(false when the file does not exist). - write_
table - Create (
ddl) and fill (insert, one parameter list per row) a store in one transaction.