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§
- Closure
Recorder - Convenience adapter that turns any
Fn(MutationEvent) + Send + Syncinto aMutationRecorder— useful in tests and for quick wiring. - Constraint
Catalog - Constraint
Definition - Constraint
Request - Graph
Stats - Snapshot of graph cardinality. Populated by the storage backend
(see [
super::InMemoryGraph::stats]). - InMemory
Graph - Index
Catalog - Index
Definition - Index
Request - What a caller asks the catalog to create. The
explicit_nameisNonewhen the user did not name the index at the call site — the catalog will mint a deterministic one. - Lock
Table - Sharded per-record write-lock registry. Cloning is cheap (one
Arcper shard map) so the table can live behind anArcshared across all writers. - Mutation
Write Set - Set of record ids touched by a buffered
MutationEventstream. - Snapshot
Meta - Metadata reported by snapshot encode / decode entry points. Kept small and stable so callers can log / diff it without reflecting on the payload.
- Snapshot
Payload - Portable representation of an entire store state.
- Stored
Property Type - Stored representation of a property-type constraint’s target type.
Mirrors the AST
PropertyTypeExprbut lives in the store layer so the catalog has no AST dependency. - Write
SetLocks - 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§
- Constraint
Violation - Why a mutation was rejected by a constraint check. The codes match the GQLSTATUS-style shapes:
- Create
Constraint Error - Create
Constraint Outcome - Create
Index Error - Create
Index Outcome - Drop
Constraint Error - Drop
Constraint Outcome - Drop
Index Error - Drop
Index Outcome - Index
Config Value - Mutation
Event - A durable, replayable mutation against a graph store.
- Snapshot
Error - 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. - Stored
Constraint Kind - Stored
Index Entity - Stored
Index Kind - Stored
Index State - Stored
Property Type Term - Stored
Scalar Type - Stored
Vector Coord Type
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§
- Borrowed
Graph Storage - Graph
Catalog - Graph
Storage - Graph
Storage Mut - Mutation
Recorder - Observer that receives every successful mutation in the order the store applied it.