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

Function Format

internal/sql/ast/print.go:48–54  ·  view source on GitHub ↗
(n Node, d format.Dialect)

Source from the content-addressed store, hash-verified

46}
47
48func Format(n Node, d format.Dialect) string {
49 tb := NewTrackedBuffer()
50 if ft, ok := n.(nodeFormatter); ok {
51 ft.Format(tb, d)
52 }
53 return tb.String()
54}
55
56func set(n Node) bool {
57 if n == nil {

Callers 7

ExpandMethod · 0.92
expandSelectStmtMethod · 0.92
getCTEColumnNamesMethod · 0.92
expandInsertStmtMethod · 0.92
expandUpdateStmtMethod · 0.92
expandDeleteStmtMethod · 0.92
TestFormatFunction · 0.92

Calls 3

NewTrackedBufferFunction · 0.85
FormatMethod · 0.65
StringMethod · 0.45

Tested by 1

TestFormatFunction · 0.74