MCPcopy Create free account
hub / github.com/bytebase/bytebase / omniIntoClause

Function omniIntoClause

backend/plugin/parser/pg/query_type.go:110–121  ·  view source on GitHub ↗

omniIntoClause returns the INTO clause of n, searching set-operation arms (UNION/INTERSECT/EXCEPT) — the parser attaches INTO to the first arm, not the root.

(n *ast.SelectStmt)

Source from the content-addressed store, hash-verified

108// omniIntoClause returns the INTO clause of n, searching set-operation arms
109// (UNION/INTERSECT/EXCEPT) — the parser attaches INTO to the first arm, not the root.
110func omniIntoClause(n *ast.SelectStmt) *ast.IntoClause {
111 if n == nil {
112 return nil
113 }
114 if n.IntoClause != nil {
115 return n.IntoClause
116 }
117 if c := omniIntoClause(n.Larg); c != nil {
118 return c
119 }
120 return omniIntoClause(n.Rarg)
121}
122
123// isExplainAnalyzeOmni checks if an ExplainStmt has the ANALYZE option.
124func isExplainAnalyzeOmni(n *ast.ExplainStmt) bool {

Callers 2

hasOmniIntoClauseFunction · 0.85
extractChangedResourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected