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//! provider-neutral catalog and transaction contracts.
10
11pub mod analyzer_binding;
12pub use analyzer_binding::{AnalyzerBindingOwner, BoundAnalyzerRevision, FieldAnalyzerBinding};
13
14pub mod backend;
15pub mod block_max_index;
16pub mod btree_index;
17pub mod catalog_index_keys;
18mod value_index_key;
19pub use value_index_key::ValueIndexKey;
20pub mod catalog;
21pub mod clustered_postings;
22pub mod document_store;
23pub mod encryption_key;
24pub use encryption_key::StorageEncryptionKey;
25pub mod hnsw_index;
26pub mod index_abc;
27pub mod index_manager;
28pub mod index_types;
29pub mod inverted_index;
30pub mod ivf_index;
31pub mod key_value;
32pub mod read_control;
33pub mod spatial_index;
34pub mod term_key;
35pub mod transaction;
36pub mod vector_index;
37
38pub use backend::{
39    PersistentStorageBackend, PersistentStorageIdentity, PersistentStorageProvider,
40    PersistentStorageSession, StorageBackendError, StorageBackendResult, StorageSavepointId,
41};
42pub use block_max_index::{BlockMaxIndex, BlockMaxScorer, DEFAULT_BLOCK_SIZE};
43pub use btree_index::BTreeIndex;
44pub use catalog::{
45    sequence_value_reservation, CatalogCacheRevisions, CatalogFacade, CatalogIndexRow,
46    ColumnStatsInput, ColumnStatsRow, EdgeRow, ForeignTableRow, GraphEntityFilter, GraphEntityKind,
47    GraphSnapshot, GraphVertexRow, RelationIdentity, RelationKind, SchemaAclEntry,
48    SchemaPrivileges, SchemaRow, SequenceAclEntry, SequenceOptions, SequenceOwner,
49    SequenceOwnerDependency, SequencePrivileges, SequenceReservationResult, SequenceRow,
50    SequenceValuePosition, SequenceValueReservation, TableAclEntry, TablePrivileges, TableSchema,
51    VectorFieldSchema, ViewRow, MAX_GRAPH_ID_PAGE,
52};
53pub use clustered_postings::{
54    MaterializedPostingCursor, PostingCursor, PostingScore, POSTING_CLUSTER_DOCS,
55};
56pub use document_store::{
57    DocumentMetadata, DocumentStore, MemoryDocumentStore, SharedDocumentRow, StoredDocument,
58};
59pub use hnsw_index::HNSWIndex;
60pub use index_abc::Index;
61pub use index_manager::{BTreeIndexHandle, IndexManager};
62pub use index_types::{IndexDef, IndexType};
63pub use inverted_index::{AnalyzerPhase, InvertedIndex, MemoryInvertedIndex};
64pub use ivf_index::{IVFIndex, IVFState};
65pub use key_value::{
66    KeyValueBatch, KeyValueCatalog, KeyValueDocumentStore, KeyValueInvertedIndex,
67    KeyValueStorageBackend, KeyValueStore, KeyValueVectorIndex, MemoryKeyValueStore,
68};
69pub use spatial_index::{haversine_distance, MemorySpatialIndex, SpatialIndex};
70pub use term_key::TokenTermKey;
71pub use transaction::{InMemoryTransaction, Snapshotable, TransactionError, TxResult};
72pub use vector_index::{
73    cosine_similarity, HNSWIndexParams, IVFIndexParams, MemoryVectorIndex, VectorIndex,
74    VectorIndexOpenMode, VectorIndexSpec,
75};
76
77mod fts_index_stat;
78pub use fts_index_stat::FtsIndexStat;