Skip to main content

khive_storage/
lib.rs

1//! Storage capability traits — contracts that backend implementations satisfy.
2//!
3//! This crate contains zero implementations. It defines:
4//! - [`SqlAccess`]: base SQL capability (reader / writer / transaction)
5//! - [`VectorStore`]: embedding storage and similarity search
6//! - [`TextSearch`]: full-text search and document indexing
7//! - [`GraphStore`]: directed edge CRUD and graph traversal
8//! - [`NoteStore`]: temporal-referential note CRUD
9//! - [`EventStore`]: append-only operation log
10//! - Shared types ([`SqlValue`], [`VectorSearchHit`], [`TextSearchHit`], etc.)
11//! - [`StorageError`]: unified error type
12
13pub mod capability;
14pub mod entity;
15pub mod error;
16pub mod event;
17pub mod graph;
18pub mod note;
19pub mod sql;
20pub mod text;
21pub mod types;
22pub mod vectors;
23
24pub use capability::StorageCapability;
25pub use entity::{Entity, EntityFilter, EntityStore};
26pub use error::StorageError;
27
28pub use event::{Event, EventFilter, EventStore};
29pub use graph::GraphStore;
30pub use note::{Note, NoteStore};
31pub use sql::{SqlAccess, SqlReader, SqlTransaction, SqlWriter};
32pub use text::TextSearch;
33pub use types::StorageResult;
34pub use vectors::VectorStore;
35
36pub use types::{
37    BatchWriteSummary, DeleteMode, Direction, Edge, EdgeFilter, EdgeSortField, GraphPath,
38    IndexRebuildScope, LinkId, NeighborHit, NeighborQuery, Page, PageRequest, PathNode,
39    SortDirection, SortOrder, SqlIsolation, SqlRow, SqlStatement, SqlTxOptions, SqlValue,
40    TextDocument, TextFilter, TextIndexStats, TextQueryMode, TextSearchHit, TextSearchRequest,
41    TimeRange, TraversalOptions, TraversalRequest, VectorIndexKind, VectorMetadataFilter,
42    VectorRecord, VectorSearchHit, VectorSearchRequest, VectorStoreCapabilities, VectorStoreInfo,
43};
44
45pub use khive_types::{EdgeCategory, EdgeRelation, EventOutcome, SubstrateKind};