MCPcopy Create free account
hub / github.com/AfterShip/clickhouse-sql-parser / WriteByte

Method WriteByte

parser/format.go:63–75  ·  view source on GitHub ↗
(b byte)

Source from the content-addressed store, hash-verified

61}
62
63func (f *Formatter) WriteByte(b byte) {
64 if f.mode == FormatModeBeautify {
65 if b == newline {
66 f.builder.WriteByte(newline)
67 f.lineStart = true
68 return
69 }
70 f.writeIndentIfNeeded()
71 f.builder.WriteByte(b)
72 } else {
73 f.builder.WriteByte(b)
74 }
75}
76
77func (f *Formatter) WriteExpr(expr Expr) {
78 if expr == nil {

Callers 15

WriteStringMethod · 0.95
NewLineMethod · 0.95
BreakMethod · 0.95
TestParser_FormatFunction · 0.80
validFormatSQLFunction · 0.80
TestVisitor_IdenticalFunction · 0.80
FormatSQLMethod · 0.80
FormatSQLMethod · 0.80
FormatSQLMethod · 0.80
FormatSQLMethod · 0.80
FormatSQLMethod · 0.80

Calls 1

writeIndentIfNeededMethod · 0.95

Tested by 4

TestParser_FormatFunction · 0.64
validFormatSQLFunction · 0.64
TestVisitor_IdenticalFunction · 0.64