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