(tree *pg_query.ParseResult, result *Result)
| 18 | } |
| 19 | |
| 20 | func (t *LockingTransform) Transform(tree *pg_query.ParseResult, result *Result) (bool, error) { |
| 21 | changed := false |
| 22 | |
| 23 | // Locking clauses can appear at any depth (subquery, CTE, EXISTS sublink, |
| 24 | // set-operation arm), and DuckDB rejects them all. |
| 25 | WalkFunc(tree, func(node *pg_query.Node) bool { |
| 26 | if sel := node.GetSelectStmt(); sel != nil { |
| 27 | if stripLockingClauses(sel) { |
| 28 | changed = true |
| 29 | } |
| 30 | } |
| 31 | return true |
| 32 | }) |
| 33 | |
| 34 | return changed, nil |
| 35 | } |
| 36 | |
| 37 | // stripLockingClauses clears the locking clause on sel and on its |
| 38 | // set-operation arms. walkSelectStmt recurses into Larg/Rarg without invoking |
nothing calls this directly
no test coverage detected