Skip to main content

Module db

Module db 

Source
Expand description

SQLite projection database utilities.

Runtime defaults are intentionally conservative:

  • journal_mode = WAL to allow concurrent readers while writers append
  • busy_timeout = 5s to reduce transient lock failures under contention
  • foreign_keys = ON to protect relational integrity in projection tables

Modules§

fts
FTS5 full-text search with BM25 ranking.
incremental
Incremental projection rebuild and invalidation.
migrations
SQLite schema migrations for the disposable projection database.
project
Event replay → SQLite projection pipeline.
query
SQLite query helpers for the projection database.
rebuild
Full projection rebuild from the event log.
schema
Canonical SQLite projection schema for bones.

Constants§

DEFAULT_BUSY_TIMEOUT
Busy timeout used for projection DB connections.

Functions§

open_projection
Open (or create) the projection SQLite database, apply runtime pragmas, and migrate schema to the latest version.