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;
14pub mod catalog;
15pub mod clustered_postings;
16pub mod document_store;
17pub mod hnsw_index;
18pub mod index_abc;
19pub mod index_manager;
20pub mod index_types;
21pub mod inverted_index;
22pub mod ivf_index;
23pub mod key_value;
24pub mod spatial_index;
25pub mod sqlite;
26pub mod transaction;
27pub mod vector_index;
28
29pub use backend::{
30    PersistentStorageBackend, PersistentStorageIdentity, PersistentStorageProvider,
31    PersistentStorageSession, SQLiteStorageBackend, SQLiteStorageProvider, StorageBackendError,
32    StorageBackendResult, StorageSavepointId,
33};
34pub use block_max_index::{BlockMaxIndex, BlockMaxScorer, DEFAULT_BLOCK_SIZE};
35pub use btree_index::BTreeIndex;
36pub use catalog::{
37    CatalogFacade, CatalogIndexRow, ColumnStatsInput, ColumnStatsRow, EdgeRow, ForeignTableRow,
38    GraphSnapshot, GraphVertexRow, RelationIdentity, RelationKind, SequenceRow, TableSchema,
39    VectorFieldSchema, ViewRow,
40};
41pub use clustered_postings::{
42    MaterializedPostingCursor, PostingCursor, PostingScore, POSTING_CLUSTER_DOCS,
43};
44pub use document_store::{DocumentStore, MemoryDocumentStore, SharedDocumentRow};
45pub use hnsw_index::HNSWIndex;
46pub use index_abc::Index;
47pub use index_manager::{BTreeIndexHandle, IndexManager};
48pub use index_types::{IndexDef, IndexType};
49pub use inverted_index::{AnalyzerPhase, InvertedIndex, MemoryInvertedIndex};
50pub use ivf_index::{IVFIndex, IVFState};
51pub use key_value::{
52    KeyValueBatch, KeyValueCatalog, KeyValueDocumentStore, KeyValueInvertedIndex,
53    KeyValueStorageBackend, KeyValueStore, KeyValueVectorIndex, MemoryKeyValueStore,
54};
55pub use spatial_index::{haversine_distance, MemorySpatialIndex, SpatialIndex};
56pub use sqlite::{
57    detect_database_file_format, read_authenticated_anchor, Catalog, DatabaseFileFormat,
58    ManagedConnection, SQLiteBTreeIndexStore, SQLiteCompressedContainerAnchor,
59    SQLiteCompressionCodec, SQLiteCompressionOptions, SQLiteDocumentStore, SQLiteError,
60    SQLiteHNSWIndex, SQLiteIVFIndex, SQLiteInvertedIndex, SQLiteVectorIndex,
61};
62pub use transaction::{
63    InMemoryTransaction, SQLiteTransaction, Snapshotable, TransactionError, TxResult,
64};
65pub use vector_index::{
66    cosine_similarity, HNSWIndexParams, IVFIndexParams, MemoryVectorIndex, VectorIndex,
67    VectorIndexOpenMode, VectorIndexSpec,
68};