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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphPlan
impl<'de> Deserialize<'de> for GraphPlan
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GraphPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GraphPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for GraphPlan
impl Serialize for GraphPlan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for GraphPlan
Auto Trait Implementations§
impl Freeze for GraphPlan
impl RefUnwindSafe for GraphPlan
impl Send for GraphPlan
impl Sync for GraphPlan
impl Unpin for GraphPlan
impl UnsafeUnpin for GraphPlan
impl UnwindSafe for GraphPlan
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more