Expand description
cypher-rs - openCypher front-end in Rust.
Pre-v0. Parses a subset of openCypher including read clauses (MATCH,
LOAD CSV, WHERE, RETURN, WITH, ordering and pagination) and update
clauses (CREATE, CREATE UNIQUE, MERGE, SET, REMOVE, DELETE,
UNWIND, FOREACH), legacy START lookups,
the EXPLAIN, PROFILE, CYPHER, and USING PERIODIC COMMIT query
options, index and constraint schema commands, plus common expressions.
Semantic analysis includes conservative expression type inference and
statically-known operand and clause-context validation, with optional
schema metadata for variables, properties, parameters, and functions.
use cypher_rs_zk::parse;
let q = parse("MATCH (u:User) WHERE u.id = $uid RETURN u.name").unwrap();
assert_eq!(q.clauses.len(), 3);Roadmap and scope: see the project README.
Re-exports§
pub use cost::estimate;pub use cost::estimate_cost;pub use cost::CardinalityCostModel;pub use cost::CostModel;pub use cost::Estimate;pub use error::ParseError;pub use optimize::optimize;pub use plan::plan;pub use plan::Plan;pub use plan::PlanError;pub use plan::ProjectExpr;pub use plan::SortKey;pub use prune::output_columns;pub use prune::required_input_columns;pub use sema::analyze;pub use sema::analyze_with;pub use sema::infer_expression_type;pub use sema::infer_expression_type_with;pub use sema::AnalysisReport;pub use sema::CypherType;pub use sema::FunctionSignature;pub use sema::PermissiveSchema;pub use sema::Schema;pub use sema::SemIssue;pub use sema::SemSeverity;pub use ast::*;
Modules§
- ast
- Abstract syntax tree for the openCypher subset supported in v0.
- cost
- Cost model for logical plans (v0.7).
- error
- mcp
- MCP (Model Context Protocol) server for
cypher-rs. - optimize
- Logical-plan optimizer (v0.6 / v0.11).
- plan
- Logical query plan and AST-to-plan lowering.
- prune
- Projection pruning analysis (v0.10).
- sema
- Semantic analysis: variable binding and scope checking.