Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Dec 10, 2024
1 parent 7be85da commit a48ced7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/vt/sqlparser/cow.go → go/vt/sqlparser/copy_on_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func CopyOnRewrite(
return out
}

// CopyAndReplaceExpr traverses a syntax tree recursively, starting with root,
// and replaceFn is called for each node that is an Expr. If replaceFn returns
// true, the node is replaced with the returned node.
func CopyAndReplaceExpr(node SQLNode, replaceFn func(node Expr) (Expr, bool)) SQLNode {
var replace Expr
pre := func(node, _ SQLNode) bool {
Expand Down

0 comments on commit a48ced7

Please sign in to comment.