Skip to main content

khive_db/
lib.rs

1//! SQLite storage backend for the khive knowledge graph runtime.
2//!
3//! Provides entity, note, event, edge, FTS5 text search, and optional
4//! `sqlite-vec` vector storage over a WAL-mode connection pool.
5
6/// Concrete storage backend providing capability-trait factories.
7pub mod backend;
8/// Error types for the SQLite layer.
9pub mod error;
10/// SQLite extension registration (sqlite-vec auto-extension).
11pub mod extension;
12/// Schema migration system (versioned migrations).
13pub mod migrations;
14/// WAL-mode connection pool: one writer, N concurrent readers.
15pub mod pool;
16/// `SqlAccess` trait bridge to `ConnectionPool`.
17pub mod sql_bridge;
18/// Per-substrate store implementations (entity, note, graph, event, text, vectors, sparse).
19pub mod stores;
20
21pub use backend::StorageBackend;
22pub use error::SqliteError;
23pub use migrations::{
24    inspect_schema_version, query_embedding_models, read_schema_version, run_migrations,
25    EmbeddingModelRegistryRecord, Migration, ServiceSchemaPlan, VersionedMigration, MIGRATIONS,
26};
27pub use pool::{ConnectionPool, PoolConfig, ReaderGuard, WriterGuard};
28pub use sql_bridge::SqlBridge;