Skip to main content

transform_all

Function transform_all 

Source
pub fn transform_all<F>(expr: Expression, fun: &F) -> Result<Expression>
Expand description

Transforms every expression node bottom-up using the generated child visitor.

Visits the same nodes as ExpressionWalk::dfs, including every typed function argument and expressions nested in clauses. Each original node is transformed once, after its children, in their stored order. Replacement nodes are not revisited, and callback errors propagate immediately.

Like the read-only walkers, this visits actual Expression fields. Embedded structs such as Update.table and Select.joins are not synthesized as extra Table or Join nodes; their expression children are still visited. A callback can edit those structs when it receives their containing expression.

Traversal uses an explicit stack and does not clone subtrees. Inferred types and other fields marked as AST metadata are preserved without visiting them.