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

Method Format

internal/sql/ast/range_var.go:19–34  ·  view source on GitHub ↗
(buf *TrackedBuffer, d format.Dialect)

Source from the content-addressed store, hash-verified

17}
18
19func (n *RangeVar) Format(buf *TrackedBuffer, d format.Dialect) {
20 if n == nil {
21 return
22 }
23 if n.Schemaname != nil && *n.Schemaname != "" {
24 buf.WriteString(d.QuoteIdent(*n.Schemaname))
25 buf.WriteString(".")
26 }
27 if n.Relname != nil {
28 buf.WriteString(d.QuoteIdent(*n.Relname))
29 }
30 if n.Alias != nil {
31 buf.WriteString(" AS ")
32 buf.astFormat(n.Alias, d)
33 }
34}

Callers

nothing calls this directly

Calls 2

astFormatMethod · 0.80
QuoteIdentMethod · 0.65

Tested by

no test coverage detected