pub struct PlanNodeWire<'a> {
pub operator_type: &'a str,
pub id: i64,
pub details: &'a str,
pub estimated_rows: Option<i64>,
pub estimate_provenance: Option<EstimateProvenance>,
pub metrics: Option<PlanMetricsWire>,
pub args: &'a IndexMap<String, CypherValue>,
pub identifiers: Vec<&'a str>,
pub children: &'a [CypherValue],
pub warnings: Vec<PlanWarning>,
pub fused: Option<FusedChildWire>,
pub body_of: Option<i64>,
}Expand description
The typed view of one structured-plan wire node (ADR-0344/0345): the
producer (relate’s PlanNode::to_value) emits exactly this
shape, so this accessor states the invariants instead of tolerating
misses — a malformed plan fails loudly rather than silently dropping
a row or shifting cells into the wrong column.
Fields§
§operator_type: &'a str§id: i64§details: &'a str§estimated_rows: Option<i64>§estimate_provenance: Option<EstimateProvenance>The ladder level behind estimated_rows (ADR-0708); present
exactly when the estimate is.
metrics: Option<PlanMetricsWire>PROFILE metrics (ADR-0344 phase 2 + metric fields): rows
produced, elapsed time, store accesses, and row-materialization
bytes — present only on PROFILE trees: the producer always emits
the four args metric fields together, so a half-present set is
a wire-contract break that fails loudly.
args: &'a IndexMap<String, CypherValue>The node’s args map, validated by the accessor (a map, present): a consumer reshaping the node (the HTTP Query API v2 plan) reads its display and identity entries from here rather than re-matching the raw map, so the invariant is stated once.
identifiers: Vec<&'a str>The identifier names the operator introduces, validated as strings at the accessor: the producer always emits the key as a list of strings, so a miss, a non-list or a non-string element is a wire-contract break that fails loudly here — the one place the invariant lives, never a per-consumer element check.
children: &'a [CypherValue]The child nodes’ raw wire values — the consumer recurses through
plan_node_wire itself, so the typed view stays shallow.
warnings: Vec<PlanWarning>The typed warnings the node carries (typed node warnings): parsed
into the one PlanWarning vocabulary — an entry outside it (or
a payload shape its variant does not carry) is a wire-contract
break that fails loudly at the accessor, never a silently
dropped warning.
fused: Option<FusedChildWire>The fused virtual child fact (virtual plan operators): Some on
a display-only breakdown step of its fused parent operator, never
an executed one — the parent link and the step’s own measured
pair (the seek step’s seek-phase time and node reads; None on a
hop step, which no real per-hop counter measures) travel
together, so the half-states are unrepresentable. Never the
parent’s rows, time or memory.
body_of: Option<i64>The batched CALL { … } IN TRANSACTIONS body role marker
(REL8-2047): the CallSubquery parent’s id on the root of a body
subtree, None on every node of the statement’s own pipeline —
the role fact Self::input_rows and Self::executed_children
read so a body operator is never taken for the data-flow child.
Implementations§
Source§impl<'a> PlanNodeWire<'a>
impl<'a> PlanNodeWire<'a>
Sourcepub fn input_rows(&self) -> Option<u64>
pub fn input_rows(&self) -> Option<u64>
The node’s input-row count (LABS-343’s structural fact): the first
child’s produced rows — the bottom-up nesting puts each earlier
clause under the one it feeds — None when the node has no input
child (the statement’s one seed row). The one spelling, read by
the plan walk and the flag fold alike.
Sourcepub fn is_executed_child(&self) -> bool
pub fn is_executed_child(&self) -> bool
Whether this node is an executed child of its parent — the one
child-role rule both walks read. Two child roles are skipped: a
display-only fused breakdown step (ADR-0622), whose measured pair
is a phase of the fused parent’s clause totals, and a batched
CALL { … } IN TRANSACTIONS body’s operator root (REL8-2047),
whose work is the CallSubquery operator’s batch record.
Sourcepub fn executed_children(&self) -> impl Iterator<Item = PlanNodeWire<'a>> + 'a
pub fn executed_children(&self) -> impl Iterator<Item = PlanNodeWire<'a>> + 'a
The node’s executed children: every child
Self::is_executed_child admits — the one skip policy, so a
walk reading executed operators or their PROFILE metrics never
counts a display-only fused step or a batched body’s operators a
second time.