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

Method FormatSQL

parser/format.go:176–186  ·  view source on GitHub ↗
(formatter *Formatter)

Source from the content-addressed store, hash-verified

174}
175
176func (a *AliasExpr) FormatSQL(formatter *Formatter) {
177 if _, isSelect := a.Expr.(*SelectQuery); isSelect {
178 formatter.WriteByte('(')
179 formatter.WriteExpr(a.Expr)
180 formatter.WriteByte(')')
181 } else {
182 formatter.WriteExpr(a.Expr)
183 }
184 formatter.WriteString(" AS ")
185 formatter.WriteExpr(a.Alias)
186}
187
188func (a *AlterRole) FormatSQL(formatter *Formatter) {
189 formatter.WriteString("ALTER ROLE ")

Callers

nothing calls this directly

Calls 3

WriteByteMethod · 0.80
WriteExprMethod · 0.80
WriteStringMethod · 0.80

Tested by

no test coverage detected