(node ast.Node, fullSQL string)
| 180 | } |
| 181 | |
| 182 | func 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 | |
| 197 | func writeSuffixSelectClause(buf *strings.Builder, node ast.Node, fullSQL string) error { |
| 198 | switch n := node.(type) { |
no test coverage detected