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
7mod lock_table;
8mod memory;
9mod mutation;
10mod snapshot;
11mod traits;
12pub mod types;
13
14// ---------- Value types ----------
15//
16// Re-exported flat for convenience (`lora_store::LoraPoint`, etc.); the
17// `types` module is also `pub` so callers can opt for the namespaced
18// path (`lora_store::types::spatial::LoraPoint`) when they prefer it.
19pub use types::{
20    cartesian_distance, cosine_similarity_bounded, cosine_similarity_raw, days_in_month,
21    dot_product, euclidean_distance, euclidean_distance_squared, euclidean_norm,
22    euclidean_similarity, hamming_distance, haversine_distance, is_leap_year, manhattan_distance,
23    manhattan_norm, parse_string_values, point_distance, resolve_srid, srid_from_crs_name,
24    srid_is_3d, srid_is_geographic, srid_is_supported, ExpandedRelationship, LoraBinary, LoraDate,
25    LoraDateTime, LoraDuration, LoraLocalDateTime, LoraLocalTime, LoraPoint, LoraTime, LoraVector,
26    NodeId, NodeRecord, PointKeyFamily, Properties, PropertyValue, RawCoordinate, RelationshipId,
27    RelationshipRecord, VectorBuildError, VectorCoordinateType, VectorValues, CRS_CARTESIAN,
28    CRS_CARTESIAN_3D, CRS_WGS84_2D, CRS_WGS84_3D, MAX_VECTOR_DIMENSION, SRID_CARTESIAN,
29    SRID_CARTESIAN_3D, SRID_WGS84, SRID_WGS84_3D,
30};
31
32// ---------- Storage trait surface ----------
33pub use traits::{BorrowedGraphStorage, GraphCatalog, GraphStorage, GraphStorageMut};
34
35// ---------- In-memory backend ----------
36pub use memory::InMemoryGraph;
37
38// ---------- Mutation stream + write-set vocabulary ----------
39pub use mutation::{ClosureRecorder, MutationEvent, MutationRecorder, MutationWriteSet};
40
41// ---------- Concurrency primitives ----------
42pub use lock_table::{LockTable, WriteSetLocks, LOCK_TABLE_SHARDS};
43
44// ---------- Snapshot vocabulary (codec lives in `lora-snapshot`) ----------
45pub use snapshot::{SnapshotError, SnapshotMeta, SnapshotPayload};