Skip to main content

remove_nodes

Function remove_nodes 

Source
pub fn remove_nodes<F: Fn(&Expression) -> bool>(
    expr: Expression,
    predicate: F,
) -> Expression
Expand description

Remove (replace with a Null) all nodes matching predicate.

This is most useful for removing clauses or sub-expressions from a tree. Note that removing structural elements (e.g. the FROM clause) may produce invalid SQL; use with care.