Expand description
SQLite helpers (kernel spec §1).
Structs§
- Connection
Guard - Coordinated
Connection - Store mutex with a fixed ordering: owner gate, then the connection.
- Owned
Connection - A SQLite connection retaining its process ownership. Dereferencing it exposes SQLite only while the ownership handle remains alive.
Functions§
- kernel_
owner - Migrate the kernel’s tables (
schema), then return the database’s owner (plan 3b-iii decisions 1 and 2): the oldest row ofowners, which the kernel’s migrations create at the first start. Every store onhennery.dbbinds to it when it opens, so they agree whichever opens first. This is the one query that does not filter by the owner: it finds the owner. - migrate
- Apply
migrations[user_version..]in order, each in its own transaction. Refuses to run against a database newer than this binary. - migrate_
component - Like
migrate, for one component of a database that several own (kernel spec §1): the kernel’s tables sharehennery.dbwith the sessions module, which keepsuser_versionfor itself. Each component’s version is a row ofschema_versions, and a component newer than this binary is refused the same way. Each step reads the version inside its transaction, asmigratedoes. - open
- Open (or create) a database with the pragmas every hennery database uses.
- open_
in_ memory