Skip to main content

Crate khive_db

Crate khive_db 

Source
Expand description

SQLite storage backend for the khive knowledge graph runtime.

Provides entity, note, event, edge, FTS5 text search, and optional sqlite-vec vector storage over a WAL-mode connection pool.

Re-exports§

pub use backend::StorageBackend;
pub use checkpoint::checkpoint_once;
pub use checkpoint::run_checkpoint_task;
pub use checkpoint::CheckpointConfig;
pub use checkpoint::CheckpointTick;
pub use error::SqliteError;
pub use migrations::inspect_schema_version;
pub use migrations::query_embedding_models;
pub use migrations::read_schema_version;
pub use migrations::run_migrations;
pub use migrations::EmbeddingModelRegistryRecord;
pub use migrations::Migration;
pub use migrations::ServiceSchemaPlan;
pub use migrations::VersionedMigration;
pub use migrations::MIGRATIONS;
pub use pool::ConnectionPool;
pub use pool::PoolConfig;
pub use pool::ReaderGuard;
pub use pool::WriterGuard;
pub use sql_bridge::SqlBridge;
pub use writer_task::WriterTaskHandle;

Modules§

backend
Concrete storage backend providing capability-trait factories. Concrete storage backend providing capability traits.
checkpoint
Periodic WAL checkpoint task. Periodic WAL checkpoint task for the connection pool.
error
Error types for the SQLite layer. Error types for the SQLite storage layer.
extension
SQLite extension registration (sqlite-vec auto-extension). SQLite extension registration for sqlite-vec.
migrations
Schema migration system (versioned migrations). Schema migration system for the SQLite storage layer.
pool
WAL-mode connection pool: one writer, N concurrent readers. Connection pool for SQLite: one exclusive writer, N concurrent readers.
sql_bridge
SqlAccess trait bridge to ConnectionPool. SqlAccess bridge: connects ConnectionPool to khive_storage::SqlAccess.
stores
Per-substrate store implementations (entity, note, graph, event, text, vectors, sparse). Per-substrate SQLite store implementations.
writer_task
Single-writer task and bounded write queue (ADR-067 Component A). Single-writer task and bounded write queue (ADR-067 Component A).