Skip to main content

Crate lora_store

Crate lora_store 

Source
Expand description

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.

Re-exports§

pub use types::cartesian_distance;
pub use types::cosine_similarity_bounded;
pub use types::cosine_similarity_raw;
pub use types::days_in_month;
pub use types::dot_product;
pub use types::euclidean_distance;
pub use types::euclidean_distance_squared;
pub use types::euclidean_norm;
pub use types::euclidean_similarity;
pub use types::hamming_distance;
pub use types::haversine_distance;
pub use types::is_leap_year;
pub use types::manhattan_distance;
pub use types::manhattan_norm;
pub use types::parse_string_values;
pub use types::point_distance;
pub use types::resolve_srid;
pub use types::resolve_srid_checked;
pub use types::srid_from_crs_name;
pub use types::srid_is_3d;
pub use types::srid_is_geographic;
pub use types::srid_is_supported;
pub use types::ExpandedRelationship;
pub use types::LoraBinary;
pub use types::LoraDate;
pub use types::LoraDateTime;
pub use types::LoraDuration;
pub use types::LoraLocalDateTime;
pub use types::LoraLocalTime;
pub use types::LoraPoint;
pub use types::LoraTime;
pub use types::LoraVector;
pub use types::NodeId;
pub use types::NodeRecord;
pub use types::ParseVectorCoordinateTypeError;
pub use types::PointKeyFamily;
pub use types::Properties;
pub use types::PropertyValue;
pub use types::RawCoordinate;
pub use types::RelationshipId;
pub use types::RelationshipRecord;
pub use types::SridResolveError;
pub use types::VectorBuildError;
pub use types::VectorCoordinateType;
pub use types::VectorValues;
pub use types::CRS_CARTESIAN;
pub use types::CRS_CARTESIAN_3D;
pub use types::CRS_WGS84_2D;
pub use types::CRS_WGS84_3D;
pub use types::MAX_VECTOR_DIMENSION;
pub use types::SRID_CARTESIAN;
pub use types::SRID_CARTESIAN_3D;
pub use types::SRID_WGS84;
pub use types::SRID_WGS84_3D;

Modules§

codec
Dependency-free binary codecs for store-owned values that must cross crate boundaries.
types
Storage-layer value types — the vocabulary every backend speaks.

Structs§

ClosureRecorder
Convenience adapter that turns any Fn(MutationEvent) + Send + Sync into a MutationRecorder — useful in tests and for quick wiring.
ConstraintCatalog
ConstraintDefinition
ConstraintRequest
GraphStats
Snapshot of graph cardinality. Populated by the storage backend (see [super::InMemoryGraph::stats]).
InMemoryGraph
IndexCatalog
IndexDefinition
IndexRequest
What a caller asks the catalog to create. The explicit_name is None when the user did not name the index at the call site — the catalog will mint a deterministic one.
LockTable
Sharded per-record write-lock registry. Cloning is cheap (one Arc per shard map) so the table can live behind an Arc shared across all writers.
MutationWriteSet
Set of record ids touched by a buffered MutationEvent stream.
SnapshotMeta
Metadata reported by snapshot encode / decode entry points. Kept small and stable so callers can log / diff it without reflecting on the payload.
SnapshotPayload
Portable representation of an entire store state.
StoredPropertyType
Stored representation of a property-type constraint’s target type. Mirrors the AST PropertyTypeExpr but lives in the store layer so the catalog has no AST dependency.
VectorIndexSnapshot
Snapshot of one vector index, carried through the snapshot pipeline. Only HNSW backends are persisted today (see [VectorIndexRegistry::to_snapshots]); the enum is open for a future Flat arm if pre-built flat backends become expensive to rebuild for some workload.
WriteSetLocks
Bundle of per-record locks held by a single writer’s commit critical section. Holding the locks here (rather than scattered MutexGuards) makes drop order deterministic — all locks release when this struct drops, regardless of which release path (commit / abort / panic) the writer took.

Enums§

ConstraintViolation
Why a mutation was rejected by a constraint check. The codes match the GQLSTATUS-style shapes:
CreateConstraintError
CreateConstraintOutcome
CreateIndexError
CreateIndexOutcome
DropConstraintError
DropConstraintOutcome
DropIndexError
DropIndexOutcome
IndexConfigValue
MutationEvent
A durable, replayable mutation against a graph store.
SnapshotError
Errors a backend may surface while building or restoring a snapshot payload. Codec-level errors live in [lora-snapshot]; these are the store-side payload-shaped failures.
StoredConstraintKind
StoredIndexEntity
StoredIndexKind
StoredIndexState
StoredPropertyTypeTerm
StoredScalarType
StoredVectorCoordType
VectorBackendSnapshot

Constants§

LOCK_TABLE_SHARDS
Power-of-two number of shards in the lock table. Chosen large enough that per-shard contention is well below per-record contention for any realistic thread count, small enough that the table itself stays under a few KB of empty-shard overhead.

Traits§

BorrowedGraphStorage
GraphCatalog
GraphStorage
GraphStorageMut
MutationRecorder
Observer that receives every successful mutation in the order the store applied it.