Skip to main content

Crate graph_engine

Crate graph_engine 

Source
Expand description

Graph engine for property graphs with nodes, edges, and traversal algorithms.

This crate provides a thread-safe graph database engine supporting:

  • Labeled nodes with arbitrary properties
  • Directed and undirected edges with properties
  • Property indexes for efficient lookups
  • Unique and existence constraints
  • Graph algorithms (PageRank, betweenness centrality, connected components)
  • BFS/DFS traversal with filtering
  • Batch operations for high-throughput scenarios

§Thread Safety

GraphEngine is thread-safe and can be shared across threads using Arc. All operations use fine-grained locking via parking_lot::RwLock.

Re-exports§

pub use algorithms::AStarConfig;
pub use algorithms::AStarResult;
pub use algorithms::BiconnectedConfig;
pub use algorithms::BiconnectedResult;
pub use algorithms::HeuristicFn;
pub use algorithms::KCoreConfig;
pub use algorithms::KCoreResult;
pub use algorithms::MstConfig;
pub use algorithms::MstEdge;
pub use algorithms::MstResult;
pub use algorithms::SccConfig;
pub use algorithms::SccResult;
pub use algorithms::SimilarityConfig;
pub use algorithms::SimilarityMetric;
pub use algorithms::SimilarityResult;
pub use algorithms::TriangleConfig;
pub use algorithms::TriangleResult;
pub use distributed::CrossShardQuery;
pub use distributed::DistributedConfig;
pub use distributed::DistributedError;
pub use distributed::DistributedGraphEngine;
pub use distributed::DistributedResult;
pub use distributed::DistributedStats;
pub use distributed::DistributedStatsSnapshot;
pub use distributed::DistributedTransaction;
pub use distributed::GraphOperation;
pub use partitioning::GraphPartitioner;
pub use partitioning::PartitionAssignment;
pub use partitioning::PartitionConfig;
pub use partitioning::PartitionStats;
pub use partitioning::PartitionStrategy;
pub use partitioning::ShardId;

Modules§

algorithms
Graph algorithms module.
distributed
Distributed graph engine abstractions for consensus and coordination.
partitioning
Graph partitioning strategies for distributed graph operations.

Structs§

AggregateResult
Result of an aggregation operation on graph data.
AllPaths
Collection of all shortest unweighted paths between two nodes.
AllPathsConfig
Configuration for all-paths search to prevent memory explosion.
AllWeightedPaths
Collection of all shortest weighted paths between two nodes.
BatchDeleteResult
Batch delete result with failure tracking.
BatchResult
Result of a batch operation.
CentralityConfig
Configuration for centrality algorithms.
CentralityResult
Result of centrality computation.
CommunityConfig
Configuration for community detection algorithms.
CommunityResult
Result of community detection.
Constraint
A constraint definition for property validation.
Edge
EdgeInput
Input for batch edge creation.
EdgePattern
An edge pattern that matches edges by type and/or property conditions.
FullTextConfig
Configuration for full-text index.
FullTextIndex
Full-text search index using an inverted index structure.
GeoConfig
Configuration for geospatial index.
GeoIndex
Geospatial index using a grid-based structure.
GeoPoint
A geospatial point.
GraphBatchItemError
Error detail for a failed item in a graph batch operation.
GraphEngine
Lock ordering (acquire in this order to prevent deadlocks):
GraphEngineConfig
Configuration for GraphEngine runtime behavior.
Node
NodeInput
Input for batch node creation.
NodePattern
A node pattern that matches nodes by label and/or property conditions.
OrderedFloat
Wrapper for f64 that provides total ordering (NaN sorts first).
PageRankConfig
Configuration for PageRank algorithm.
PageRankResult
Result of PageRank computation.
PagedResult
Result of a paginated graph query.
Pagination
Pagination configuration for graph queries.
Path
PathPattern
A path pattern: (a)-[r]->(b)-[s]->(c)
PathSearchStats
Statistics from path search.
Pattern
A complete pattern query.
PatternMatch
A single match with all variable bindings.
PatternMatchResult
Result of pattern matching operation.
PatternMatchStats
Statistics from pattern matching.
PropertyCondition
A single property condition for filtering nodes or edges during traversal.
TraversalFilter
Filter configuration for graph traversal operations.
VariableLengthConfig
Configuration for variable-length path traversal.
VariableLengthPaths
Result of variable-length path search.
VariableLengthSpec
Variable-length path specification (e.g., *1..5).
WalConfig
WAL configuration.
WeightedPath
A path with accumulated edge weights from Dijkstra’s algorithm.

Enums§

Binding
A binding of a variable to a graph element.
CentralityType
Type of centrality measure.
CompareOp
Comparison operator for property conditions during traversal.
ConstraintTarget
Target scope of a constraint.
ConstraintType
Type of constraint enforcement.
Direction
GraphError
Error type for graph operations.
IndexTarget
Target of an index (node or edge properties).
OrderedPropertyValue
Property value with total ordering for BTreeMap indexes.
PatternElement
An element in a path pattern.
PropertyValue
A typed property value for nodes and edges.
PropertyValueType
Property value type for type constraints.
RangeOp
Range comparison operator for property queries.

Constants§

MAX_VARIABLE_LENGTH_HOPS
Maximum hops for variable-length edge patterns (safety cap for VariableLengthSpec).

Type Aliases§

Result
Result type alias for graph operations.