Skip to content

@paraharness/sqlite ​

Variables ​

VariableDescription
SQL_IDENTIFIER_REGEXRegular expression enforcing safe SQL table and identifier syntax (^[A-Za-z_][A-Za-z0-9_]*$).
sqlitePure AST builder namespace for @paraharness/sqlite storage and source adapters.
SQLITE_DDL_STATEMENTSIdempotent SQLite DDL statements initializing tables for SqliteLedgerStore, SqliteTopologyStore, and SqliteLessonStore.
SQLITE_PRAGMA_STATEMENTSSQLite connection PRAGMA statements executed immediately when opening a WAL-mode database.
sqliteExecutorsPre-built RuntimeExecutorRegistrySlice for @paraharness/sqlite.

Functions ​

FunctionDescription
assertValidSqlIdentifierValidates that identifier matches ^[A-Za-z_][A-Za-z0-9_]*$.
computeNormalizedRelevanceComputes normalized text relevance $R(L, Q) \in [0, 1]$ between a single lesson directive and queryText via MiniSearch.
computeNormalizedRelevanceScoresComputes normalized BM25 + fuzzy/prefix relevance scores $R(L, Q) \in [0, 1]$ across candidates using MiniSearch.
createCompactionConfigBuilderCreates an immutable CompactionConfigBuilder instance for ledger wire-frame pruning policies.
createSqliteExecutorsCreates a RuntimeExecutorRegistrySlice registering all @paraharness/sqlite storage and source executors.
createSqliteGlobalRulesBuilderCreates an immutable SqliteGlobalRulesBuilder for uri and options.table.
createSqliteLedgerBuilderCreates an immutable SqliteLedgerBuilder targeting uri.
createSqliteLessonsBuilderCreates an immutable SqliteLessonsBuilder targeting uri.
createSqliteTopologyBuilderCreates an immutable SqliteTopologyBuilder targeting uri.
executeSqliteGlobalRulesSourceExecutes a SqliteRulesSourceNode (type: 'sqlite:global-rules') to load ordered global rules.
openSqliteConnectionOpens or initializes a WAL-mode better-sqlite3 database connection and applies all schema DDL statements.

Classes ​

ClassDescription
SqliteLedgerStoreWAL-mode SQLite implementation of the @paraharness/core LedgerStore runtime port.
SqliteLessonStoreWAL-mode SQLite implementation of the @paraharness/core LessonStore runtime port.
SqliteTopologyStoreWAL-mode SQLite implementation of the @paraharness/core TopologyStore runtime port.

Interfaces ​

InterfaceDescription
CompactionConfigBuilderFluent configurator for SQLite and PostgreSQL ledger wire-frame compaction policies (.compactWhen($c => ...)).
CompactionSignalTriggerOptionsOptions for configuring a signal-correlated ledger compaction trigger via CompactionConfigBuilder.onSignal.
CompactionTerminalExitOptionsOptions for configuring a terminal exit state compaction trigger via CompactionConfigBuilder.onTerminalExit.
SqliteGlobalRulesBuilderFluent builder for a passive SqliteRulesSourceNode (sqlite.globalRules(uri, { table })).
SqliteGlobalRulesOptionsOptions passed to sqlite.globalRules(uri, options).
SqliteLedgerBuilderFluent builder for a passive SqliteLedgerNode (sqlite.ledger(uri)).
SqliteLedgerNodePassive AST node configuring a WAL-mode SQLite ledger store (sqlite.ledger).
SqliteLessonsBuilderFluent builder for a passive SqliteLessonsNode (sqlite.lessonStore(uri)).
SqliteLessonsNodePassive AST node configuring a WAL-mode SQLite lesson store (sqlite.lessonStore).
SqliteNamespacePublic builder namespace contract exported as sqlite from @paraharness/sqlite.
SqliteRulesSourceNodePassive AST node loading global rules from a SQLite table (sqlite.globalRules).
SqliteTopologyBuilderFluent builder for a passive SqliteTopologyNode (sqlite.topologyStore(uri)).
SqliteTopologyNodePassive AST node configuring a WAL-mode SQLite topology store (sqlite.topologyStore).

Released under the MIT License.