MCPcopy
hub / github.com/sqlc-dev/sqlc / Format

Method Format

internal/sql/ast/res_target.go:16–31  ·  view source on GitHub ↗
(buf *TrackedBuffer, d format.Dialect)

Source from the content-addressed store, hash-verified

14}
15
16func (n *ResTarget) Format(buf *TrackedBuffer, d format.Dialect) {
17 if n == nil {
18 return
19 }
20 if set(n.Val) {
21 buf.astFormat(n.Val, d)
22 if n.Name != nil {
23 buf.WriteString(" AS ")
24 buf.WriteString(d.QuoteIdent(*n.Name))
25 }
26 } else {
27 if n.Name != nil {
28 buf.WriteString(d.QuoteIdent(*n.Name))
29 }
30 }
31}

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
astFormatMethod · 0.80
QuoteIdentMethod · 0.65

Tested by

no test coverage detected