Documentation
¶
Overview ¶
Package sqlite is the SQLite and local-filesystem storage backend: mirror.db for every record store, a content-addressed blob directory, and audit.jsonl, all under one store root.
Index ¶
Constants ¶
const Name = "sqlite"
Name is the storage.backend value that selects this backend.
Variables ¶
This section is empty.
Functions ¶
func DatabasePath ¶
DatabasePath is the database file of the store under root.
func Exists ¶
Exists reports whether a store has been initialised under root. Only an absent database reads as false; any other stat failure is left for the open to report.
func LedgerPath ¶
LedgerPath is the append-only assurance log of the store under root; the log's own reader names it, so the writer and the reader cannot disagree.
func Migrations ¶
func Migrations() []sqlitestore.Migration
Migrations returns every migration the binary knows about, in apply order. Its length is the binary's expected schema version, so the CLI and the public façade open mirror.db against an identical schema.
func Open ¶
Open opens the store under req.StoreRoot and returns every store over it.
The database is opened without migrations, judged, then migrated, because schema_migrations is keyed on (module, version): a store from a newer build reads as fully applied, so its unknown rows are the only signal. A write intent applies nothing to such a store and Writable refuses it; a read intent still opens it, so an operator can diagnose the refusal.
IntentInspect applies no migration, creates no ledger and runs no maintenance, so the schema state it reports is the store as found; it refuses a root with no database.
Types ¶
type Settings ¶
type Settings struct{}
Settings is the sqlite section of config.yaml. It has no keys: every path the backend uses derives from the store root.
func (Settings) ConfigComment ¶
ConfigComment is the explanation `config init` writes under the section.