pub struct GraphPlan {
pub ir_version: IrVersion,
pub dialect: String,
pub ontology_version: Option<OntologyVersion>,
pub ontology_mode: OntologyMode,
pub feature_flags: Vec<String>,
pub ops: Vec<GraphOp>,
pub exprs: ExprArena,
}Expand description
A versioned, serialisable graph query plan.
GraphPlan is the stable contract between the binder and the execution
engine. It carries the full operator pipeline, all referenced expressions
in a flat ExprArena, and the ontology metadata needed by the relational
lowering layer.
§Construction
Use GraphPlan::builder rather than constructing this directly:
use graphforge_ir::{GraphPlan, GraphOp, VarId};
let plan = GraphPlan::builder("openCypher")
.push_op(GraphOp::NodeScan { var: VarId(0), ty: None })
.build();
assert_eq!(plan.ops.len(), 1);
assert_eq!(plan.dialect, "openCypher");Fields§
§ir_version: IrVersionIR format version for forward-compatibility checks.
dialect: StringQuery dialect (e.g. "openCypher").
ontology_version: Option<OntologyVersion>Ontology version used when the plan was compiled.
None in Exploratory mode (no formal ontology present).
ontology_mode: OntologyModeActive ontology enforcement mode.
feature_flags: Vec<String>Optional feature flags that affect plan behaviour.
ops: Vec<GraphOp>The operator pipeline (in execution order).
exprs: ExprArenaAll expressions referenced by operators in this plan.
Implementations§
Source§impl GraphPlan
impl GraphPlan
Sourcepub fn builder(dialect: impl Into<String>) -> GraphPlanBuilder
pub fn builder(dialect: impl Into<String>) -> GraphPlanBuilder
Create a GraphPlanBuilder for constructing a new plan.
dialect identifies the query language (e.g. "openCypher").
The builder defaults to ir_version = IrVersion::CURRENT and
ontology_mode = OntologyMode::Exploratory.