lora-store 0.20.0

In-memory graph store with property indexes for LoraDB.
Documentation
//! Storage layer: graph value types, the trait surface every backend
//! implements, and the in-memory reference backend.
//!
//! Public surface is laid out here so the full export of the crate is
//! readable in one place.

pub mod codec;
pub mod intern;
mod lock_table;
mod memory;
mod mutation;
mod snapshot;
mod traits;
pub mod types;

// ---------- Value types ----------
//
// Re-exported flat for convenience (`lora_store::LoraPoint`, etc.); the
// `types` module is also `pub` so callers can opt for the namespaced
// path (`lora_store::types::spatial::LoraPoint`) when they prefer it.
pub use types::{
    bbox_contains, bbox_x_ranges, cartesian_distance, cosine_similarity_bounded,
    cosine_similarity_raw, days_in_month, dot_product, euclidean_distance,
    euclidean_distance_squared, euclidean_norm, euclidean_similarity, hamming_distance,
    haversine_distance, is_leap_year, manhattan_distance, manhattan_norm, parse_string_values,
    point_distance, resolve_srid, resolve_srid_checked, srid_from_crs_name, srid_is_3d,
    srid_is_geographic, srid_is_supported, ExpandedRelationship, LocalOffset, LoraBinary, LoraDate,
    LoraDateTime, LoraDuration, LoraLocalDateTime, LoraLocalTime, LoraPoint, LoraTime, LoraVector,
    NamedPointCoordinates, NodeId, NodeRecord, ParseVectorCoordinateTypeError, PointKeyFamily,
    Properties, PropertyMap, PropertyValue, RawCoordinate, RelationshipId, RelationshipRecord,
    SridResolveError, VectorBuildError, VectorCoordinateType, VectorValues, ZoneId, CRS_CARTESIAN,
    CRS_CARTESIAN_3D, CRS_WGS84_2D, CRS_WGS84_3D, MAX_VECTOR_DIMENSION, SRID_CARTESIAN,
    SRID_CARTESIAN_3D, SRID_WGS84, SRID_WGS84_3D,
};

// ---------- Storage trait surface ----------
pub use traits::{BorrowedGraphStorage, GraphCatalog, GraphStorage, GraphStorageMut};

// ---------- In-memory backend ----------
pub use memory::InMemoryGraph;

// ---------- Memory-footprint diagnostics ----------
//
// Debug-only retained-heap breakdown of an `InMemoryGraph`. Used by
// the memory benchmark in `lora-database/benches/memory.rs` and the
// `mem_probe*` examples to attribute observed RSS growth to a
// specific component.
pub use memory::{property_value_heap_bytes, MemoryReport};

// ---------- Property-key interning ----------
//
// Re-exported flat so callers building `Properties` can write
// `lora_store::intern("name")` instead of importing the submodule.
pub use intern::{intern, intern_owned};

// ---------- Index catalog (CREATE INDEX surface) ----------
pub use memory::{
    CreateIndexError, CreateIndexOutcome, DropIndexError, DropIndexOutcome, GraphStats,
    IndexCatalog, IndexConfigValue, IndexDefinition, IndexRequest, StoredIndexEntity,
    StoredIndexKind, StoredIndexState, VectorBackendSnapshot, VectorIndexSnapshot,
};

// ---------- Constraint catalog (CREATE CONSTRAINT surface) ----------
pub use memory::{
    ConstraintCatalog, ConstraintDefinition, ConstraintRequest, ConstraintViolation,
    CreateConstraintError, CreateConstraintOutcome, DropConstraintError, DropConstraintOutcome,
    StoredConstraintKind, StoredPropertyType, StoredPropertyTypeTerm, StoredScalarType,
    StoredVectorCoordType,
};

// ---------- Mutation stream + write-set vocabulary ----------
pub use mutation::{
    ClosureRecorder, DeletedRecordSink, MutationEvent, MutationRecorder, MutationWriteSet,
};

// ---------- Concurrency primitives ----------
pub use lock_table::{LockTable, WriteSetLocks, LOCK_TABLE_SHARDS};

// ---------- Snapshot vocabulary (codec lives in `lora-snapshot`) ----------
pub use snapshot::{SnapshotError, SnapshotMeta, SnapshotPayload};