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

Method Format

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

Source from the content-addressed store, hash-verified

17}
18
19func (n *IndexElem) Format(buf *TrackedBuffer, d format.Dialect) {
20 if n == nil {
21 return
22 }
23 if n.Name != nil && *n.Name != "" {
24 buf.WriteString(*n.Name)
25 } else if set(n.Expr) {
26 buf.astFormat(n.Expr, d)
27 }
28}

Callers

nothing calls this directly

Calls 2

setFunction · 0.85
astFormatMethod · 0.80

Tested by

no test coverage detected