Skip to main content

sz_orm_graph/
lib.rs

1//! # SZ-ORM Graph — Neo4j Graph Database Support
2//!
3//! Provides graph database connection, parameterized Cypher queries, typed result mapping, and declarative modeling capabilities.
4//! Does not modify existing sz-orm-core/sz-orm-sqlx APIs.
5//!
6//! ## Main Modules
7//!
8//! - [`connection`] — Bolt protocol connection and connection pool
9//! - [`query`] — Cypher query construction and execution
10//! - [`validator`] — Parameterized validation + SQL passthrough rejection
11//! - [`model`] — Declarative modeling
12//! - [`mapping`] — Typed result mapping
13//! - [`error`] — GraphError error type
14
15pub mod algorithm;
16pub mod community;
17pub mod connection;
18pub mod cypher_parser;
19pub mod engine;
20pub mod error;
21pub mod graph_stats;
22pub mod mapping;
23pub mod model;
24pub mod path_analysis;
25pub mod query;
26pub mod subgraph;
27pub mod validator;
28
29#[cfg(feature = "graph-query-deep")]
30pub mod joint_projection;
31
32#[cfg(feature = "graph-traversal")]
33pub mod traversal;
34
35pub use algorithm::{DirectedGraph, NodeId, UndirectedGraph, Weight};
36pub use community::{
37    Community, CommunityDetectionResult, ConnectedComponentDetector, LabelPropagation,
38};
39pub use connection::{GraphConfig, GraphConnection, GraphPool, GraphPoolStatus};
40pub use cypher_parser::{CypherSubsetParser, NodePattern, ParsedQuery, RelPattern, ReturnItem};
41pub use engine::InMemoryGraphEngine;
42pub use error::GraphError;
43pub use graph_stats::{DegreeDistribution, GraphStats, GraphStatsCalculator};
44pub use mapping::{NodeMapper, RelationMapper, ResultMapper};
45pub use model::{
46    GraphNodeModel, GraphPropertyDef, GraphRelationModel, GraphValueType, RelationDirection,
47};
48pub use path_analysis::{PathAnalyzer, ReachabilityMatrix};
49pub use query::{
50    execute_query, CypherQuery, CypherQueryBuilder, GraphNode, GraphPath, GraphRelationship,
51    GraphResult,
52};
53pub use subgraph::{CommonSubgraphFinder, IsomorphismChecker, SubgraphMatcher};
54#[cfg(feature = "graph-traversal")]
55pub use traversal::{
56    CompiledQuery, GraphResultHydrator, GraphTraversalCompiler, GraphTraversalDsl,
57    GraphTraversalExecutor, NestedNode, PathSegment, RelationEdge, RelationGraph, TraversalPath,
58    TraversalPathCache,
59};
60pub use validator::CypherValidator;