Skip to main content

lora_store/
lib.rs

1//! Storage layer: graph value types, the trait surface every backend
2//! implements, and the in-memory reference backend.
3//!
4//! Public surface is laid out here so the full export of the crate is
5//! readable in one place.
6
7pub mod codec;
8mod lock_table;
9mod memory;
10mod mutation;
11mod snapshot;
12mod traits;
13pub mod types;
14
15// ---------- Value types ----------
16//
17// Re-exported flat for convenience (`lora_store::LoraPoint`, etc.); the
18// `types` module is also `pub` so callers can opt for the namespaced
19// path (`lora_store::types::spatial::LoraPoint`) when they prefer it.
20pub use types::{
21    cartesian_distance, cosine_similarity_bounded, cosine_similarity_raw, days_in_month,
22    dot_product, euclidean_distance, euclidean_distance_squared, euclidean_norm,
23    euclidean_similarity, hamming_distance, haversine_distance, is_leap_year, manhattan_distance,
24    manhattan_norm, parse_string_values, point_distance, resolve_srid, resolve_srid_checked,
25    srid_from_crs_name, srid_is_3d, srid_is_geographic, srid_is_supported, ExpandedRelationship,
26    LoraBinary, LoraDate, LoraDateTime, LoraDuration, LoraLocalDateTime, LoraLocalTime, LoraPoint,
27    LoraTime, LoraVector, NodeId, NodeRecord, ParseVectorCoordinateTypeError, PointKeyFamily,
28    Properties, PropertyValue, RawCoordinate, RelationshipId, RelationshipRecord, SridResolveError,
29    VectorBuildError, VectorCoordinateType, VectorValues, CRS_CARTESIAN, CRS_CARTESIAN_3D,
30    CRS_WGS84_2D, CRS_WGS84_3D, MAX_VECTOR_DIMENSION, SRID_CARTESIAN, SRID_CARTESIAN_3D,
31    SRID_WGS84, SRID_WGS84_3D,
32};
33
34// ---------- Storage trait surface ----------
35pub use traits::{BorrowedGraphStorage, GraphCatalog, GraphStorage, GraphStorageMut};
36
37// ---------- In-memory backend ----------
38pub use memory::InMemoryGraph;
39
40// ---------- Index catalog (CREATE INDEX surface) ----------
41pub use memory::{
42    CreateIndexError, CreateIndexOutcome, DropIndexError, DropIndexOutcome, GraphStats,
43    IndexCatalog, IndexConfigValue, IndexDefinition, IndexRequest, StoredIndexEntity,
44    StoredIndexKind, StoredIndexState, VectorBackendSnapshot, VectorIndexSnapshot,
45};
46
47// ---------- Constraint catalog (CREATE CONSTRAINT surface) ----------
48pub use memory::{
49    ConstraintCatalog, ConstraintDefinition, ConstraintRequest, ConstraintViolation,
50    CreateConstraintError, CreateConstraintOutcome, DropConstraintError, DropConstraintOutcome,
51    StoredConstraintKind, StoredPropertyType, StoredPropertyTypeTerm, StoredScalarType,
52    StoredVectorCoordType,
53};
54
55// ---------- Mutation stream + write-set vocabulary ----------
56pub use mutation::{ClosureRecorder, MutationEvent, MutationRecorder, MutationWriteSet};
57
58// ---------- Concurrency primitives ----------
59pub use lock_table::{LockTable, WriteSetLocks, LOCK_TABLE_SHARDS};
60
61// ---------- Snapshot vocabulary (codec lives in `lora-snapshot`) ----------
62pub use snapshot::{SnapshotError, SnapshotMeta, SnapshotPayload};