MCPcopy Create free account
hub / github.com/PostHog/duckgres / walkUpdateStmt

Function walkUpdateStmt

transpiler/transform/transform.go:359–377  ·  view source on GitHub ↗
(stmt *pg_query.UpdateStmt, fn func(*pg_query.Node) bool)

Source from the content-addressed store, hash-verified

357 walkNode(vl, fn)
358 }
359 walkNode(stmt.LimitCount, fn)
360 walkNode(stmt.LimitOffset, fn)
361 if stmt.WithClause != nil {
362 walkNode(&pg_query.Node{Node: &pg_query.Node_WithClause{WithClause: stmt.WithClause}}, fn)
363 }
364 if stmt.Larg != nil {
365 walkSelectStmt(stmt.Larg, fn)
366 }
367 if stmt.Rarg != nil {
368 walkSelectStmt(stmt.Rarg, fn)
369 }
370}
371
372func walkInsertStmt(stmt *pg_query.InsertStmt, fn func(*pg_query.Node) bool) {
373 if stmt == nil {
374 return
375 }
376
377 if stmt.Relation != nil {
378 walkNode(&pg_query.Node{Node: &pg_query.Node_RangeVar{RangeVar: stmt.Relation}}, fn)
379 }
380 for _, col := range stmt.Cols {

Callers 1

walkNodeFunction · 0.85

Calls 1

walkNodeFunction · 0.85

Tested by

no test coverage detected