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

Function extractCTE

backend/plugin/parser/pg/backup.go:182–195  ·  view source on GitHub ↗
(node ast.Node, fullSQL string)

Source from the content-addressed store, hash-verified

180}
181
182func extractCTE(node ast.Node, fullSQL string) string {
183 var wc *ast.WithClause
184 switch n := node.(type) {
185 case *ast.UpdateStmt:
186 wc = n.WithClause
187 case *ast.DeleteStmt:
188 wc = n.WithClause
189 default:
190 }
191 if wc == nil {
192 return ""
193 }
194 return extractNodeText(wc.Loc, fullSQL)
195}
196
197func writeSuffixSelectClause(buf *strings.Builder, node ast.Node, fullSQL string) error {
198 switch n := node.(type) {

Callers 1

generateSQLForTableFunction · 0.70

Calls 1

extractNodeTextFunction · 0.85

Tested by

no test coverage detected