MCPcopy
hub / github.com/sqldef/sqldef / Format

Method Format

parser/node.go:323–339  ·  view source on GitHub ↗

Format formats the node.

(buf *nodeBuffer)

Source from the content-addressed store, hash-verified

321
322// Format formats the node.
323func (node *With) Format(buf *nodeBuffer) {
324 if node == nil || len(node.CTEs) == 0 {
325 return
326 }
327 if node.Recursive {
328 buf.Printf("WITH RECURSIVE ")
329 } else {
330 buf.Printf("WITH ")
331 }
332 for i, cte := range node.CTEs {
333 if i > 0 {
334 buf.Printf(", ")
335 }
336 buf.Printf("%v", cte)
337 }
338 buf.Printf(" ")
339}
340
341// CommonTableExpr represents a single Common Table Expression in a WITH clause
342type CommonTableExpr struct {

Callers

nothing calls this directly

Calls 1

PrintfMethod · 0.65

Tested by

no test coverage detected