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::bbox_contains;
pub use types::bbox_x_ranges;
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::Labels;
pub use types::LocalOffset;
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::Name;
pub use types::NamedPointCoordinates;
pub use types::NodeId;
pub use types::NodeRecord;
pub use types::ParseVectorCoordinateTypeError;
pub use types::PointKeyFamily;
pub use types::Properties;
pub use types::PropertyMap;
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::ZoneId;
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;
pub use types::LabelsRef;
pub use types::NodeRef;
pub use types::OtherValue;
pub use types::PropsIter;
pub use types::PropsRef;
pub use types::RelRef;
pub use types::ValueRef;
pub use intern::intern;
pub use intern::intern_owned;

Modules§

codec
Dependency-free binary codecs for store-owned values that must cross crate boundaries.
intern
Process-wide property-key intern table.
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.
ListElementStats
List elements in one RANGE index scope (see GraphStats::node_list_elements).
MemoryReport
Aggregated retained-heap breakdown of an [InMemoryGraph].
PlanSignature
Builds a GraphStats::plan_signature: a hash of every input the planner reads from the stats, with cardinalities coarsened to power-of-two buckets. Backends feed it the same items GraphStats holds, in a deterministic order, without building the maps.
PropertyIndexKeyUsage
One active hash property index key in a MemoryReport.
SnapshotCatalogs
The parts of a snapshot that are not records: the id counters and the declared catalogs. Small next to the graph.
SnapshotGraphBuilder
Builds an InMemoryGraph from snapshot records one at a time.
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.

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

Traits§

DeletedRecordSink
Observer for records a delete is about to drop.
GraphCatalog
GraphStorage
GraphStorageMut
MutationRecorder
Observer that receives every successful mutation in the order the store applied it.

Functions§

property_value_heap_bytes
Bytes beyond the embedded discriminant of a PropertyValue. The embedded discriminant itself is counted by the caller (it sits inside whatever container owns the value).

Type Aliases§

DistinctValues
(label or relationship type, property key) → estimated distinct values.