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

Method Format

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

Source from the content-addressed store, hash-verified

14}
15
16func (n *InferClause) Format(buf *TrackedBuffer, d format.Dialect) {
17 if n == nil {
18 return
19 }
20 if n.Conname != nil && *n.Conname != "" {
21 buf.WriteString("ON CONSTRAINT ")
22 buf.WriteString(*n.Conname)
23 } else if items(n.IndexElems) {
24 buf.WriteString("(")
25 buf.join(n.IndexElems, d, ", ")
26 buf.WriteString(")")
27 if set(n.WhereClause) {
28 buf.WriteString(" WHERE ")
29 buf.astFormat(n.WhereClause, d)
30 }
31 }
32}

Callers

nothing calls this directly

Calls 4

itemsFunction · 0.85
setFunction · 0.85
joinMethod · 0.80
astFormatMethod · 0.80

Tested by

no test coverage detected