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
count_derived_vector_artifacts
decode_f32_le
Decode a stable little-endian f32 persisted representation.
delete_derived_vector_artifact
embedding_to_bytes
Encode an f32 slice as bytes for SQLite BLOB storage.
encode_f32_le
Encode f32 values as a stable little-endian persisted representation.
get_search_receipt
Load a durable search receipt by receipt/request ID.
invalidate_derived_vector_artifact
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.
store_search_receipt
Persist a search receipt as replay metadata.
verify_integrity_sync
Run integrity verification on the database.
with_transaction
Run a closure inside an unchecked transaction, committing on success.