MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / Format

Method Format

internal/sql/ast/common_table_expr.go:22–37  ·  view source on GitHub ↗
(buf *TrackedBuffer, d format.Dialect)

Source from the content-addressed store, hash-verified

20}
21
22func (n *CommonTableExpr) Format(buf *TrackedBuffer, d format.Dialect) {
23 if n == nil {
24 return
25 }
26 if n.Ctename != nil {
27 buf.WriteString(*n.Ctename)
28 }
29 if items(n.Aliascolnames) {
30 buf.WriteString("(")
31 buf.join(n.Aliascolnames, d, ", ")
32 buf.WriteString(")")
33 }
34 buf.WriteString(" AS (")
35 buf.astFormat(n.Ctequery, d)
36 buf.WriteString(")")
37}

Callers

nothing calls this directly

Calls 3

itemsFunction · 0.85
joinMethod · 0.80
astFormatMethod · 0.80

Tested by

no test coverage detected