ReplaceNodes implements Rewrite
Read onlyYes
FinalYes
Interfaces
Methods
- __construct() : mixed
- Targets are found by the identity they have before the rewrite.
- of() : Node
- The replacement for $original, given as $rebuilt over its rewritten children; $rebuilt itself when nothing changes.
- one() : self
Methods
__construct()
Targets are found by the identity they have before the rewrite.
public
__construct(SplObjectStorage<Node, Node> $replacements[, array<int, Node> $removals = [] ]) : mixed
Parameters
of()
The replacement for $original, given as $rebuilt over its rewritten children; $rebuilt itself when nothing changes.
public
of(Node $original, Node $rebuilt) : Node
Apply it to a plan through LogicalPlan::transformUp(): its memo rewrites a node every consumer shares exactly once, so the shared prefix stays shared. It never reaches into a join's right side.
Parameters
Return values
Nodeone()
public
static one(Node $target, Node $replacement) : self