Skip to main content

uqa_storage/
lib.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! Persistent and in-memory backing stores for UQA: documents, inverted
8//! index, vector indexes (IVF), B-tree, in-memory spatial scan, block-max, and the
9//! `SQLite` catalog.
10
11pub mod backend;
12pub mod block_max_index;
13pub mod btree_index;
14mod catalog_index_keys;
15mod value_index_key;
16pub use value_index_key::ValueIndexKey;
17pub mod catalog;
18pub mod clustered_postings;
19pub mod document_store;
20pub mod hnsw_index;
21pub mod index_abc;
22pub mod index_manager;
23pub mod index_types;
24pub mod inverted_index;
25pub mod ivf_index;
26pub mod key_value;
27pub mod spatial_index;
28pub mod sqlite;
29pub mod transaction;
30pub mod vector_index;
31
32pub use backend::{
33    PersistentStorageBackend, PersistentStorageIdentity, PersistentStorageProvider,
34    PersistentStorageSession, SQLiteStorageBackend, SQLiteStorageProvider, StorageBackendError,
35    StorageBackendResult, StorageSavepointId,
36};
37pub use block_max_index::{BlockMaxIndex, BlockMaxScorer, DEFAULT_BLOCK_SIZE};
38pub use btree_index::BTreeIndex;
39pub use catalog::{
40    sequence_value_reservation, CatalogCacheRevisions, CatalogFacade, CatalogIndexRow,
41    ColumnStatsInput, ColumnStatsRow, EdgeRow, ForeignTableRow, GraphEntityFilter, GraphEntityKind,
42    GraphSnapshot, GraphVertexRow, RelationIdentity, RelationKind, SchemaAclEntry,
43    SchemaPrivileges, SchemaRow, SequenceAclEntry, SequenceOptions, SequenceOwner,
44    SequenceOwnerDependency, SequencePrivileges, SequenceReservationResult, SequenceRow,
45    SequenceValuePosition, SequenceValueReservation, TableAclEntry, TablePrivileges, TableSchema,
46    VectorFieldSchema, ViewRow, MAX_GRAPH_ID_PAGE,
47};
48pub use clustered_postings::{
49    MaterializedPostingCursor, PostingCursor, PostingScore, POSTING_CLUSTER_DOCS,
50};
51pub use document_store::{
52    DocumentMetadata, DocumentStore, MemoryDocumentStore, SharedDocumentRow, StoredDocument,
53};
54pub use hnsw_index::HNSWIndex;
55pub use index_abc::Index;
56pub use index_manager::{BTreeIndexHandle, IndexManager};
57pub use index_types::{IndexDef, IndexType};
58pub use inverted_index::{AnalyzerPhase, InvertedIndex, MemoryInvertedIndex};
59pub use ivf_index::{IVFIndex, IVFState};
60pub use key_value::{
61    KeyValueBatch, KeyValueCatalog, KeyValueDocumentStore, KeyValueInvertedIndex,
62    KeyValueStorageBackend, KeyValueStore, KeyValueVectorIndex, MemoryKeyValueStore,
63};
64pub use spatial_index::{haversine_distance, MemorySpatialIndex, SpatialIndex};
65pub use sqlite::{
66    detect_database_file_format, read_authenticated_anchor, Catalog, DatabaseFileFormat,
67    ManagedConnection, SQLiteBTreeIndexStore, SQLiteCompressedContainerAnchor,
68    SQLiteCompressionCodec, SQLiteCompressionOptions, SQLiteDocumentStore, SQLiteError,
69    SQLiteHNSWIndex, SQLiteIVFIndex, SQLiteInvertedIndex, SQLiteVectorIndex,
70};
71pub use transaction::{
72    InMemoryTransaction, SQLiteTransaction, Snapshotable, TransactionError, TxResult,
73};
74pub use vector_index::{
75    cosine_similarity, HNSWIndexParams, IVFIndexParams, MemoryVectorIndex, VectorIndex,
76    VectorIndexOpenMode, VectorIndexSpec,
77};