Skip to main content

Module db

Module db 

Source
Expand description

Database initialization, migrations, integrity checks, and durable sidecar state.

Structs§

IntegrityReport
Result of an integrity verification.

Enums§

ReconcileAction
Action to take when integrity issues are found.
VerifyMode
How thorough the integrity check should be.

Constants§

MAX_SCHEMA_VERSION
Maximum schema version this build supports.

Functions§

bytes_to_embedding
Decode a SQLite embedding BLOB back to f32 values.
check_embedding_metadata
Check and update the embedding metadata singleton row.
clear_embeddings_dirty
embedding_to_bytes
Encode an f32 slice as bytes for SQLite BLOB storage.
is_embeddings_dirty
open_database
Open or create a SQLite database, configure pragmas, and run migrations.
open_database_connection
Open a SQLite connection with pragmas applied but without running migrations.
reconcile_fts
Reconcile FTS indexes by rebuilding them from source data.
run_migrations
Run all pending migrations.
verify_integrity_sync
Run integrity verification on the database.
with_transaction
Run a closure inside an unchecked transaction, committing on success.