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

Method FormatSQL

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

Source from the content-addressed store, hash-verified

212}
213
214func (a *AlterTable) FormatSQL(formatter *Formatter) {
215 formatter.WriteString("ALTER TABLE ")
216 formatter.WriteExpr(a.TableIdentifier)
217 if a.OnCluster != nil {
218 formatter.Break()
219 formatter.WriteExpr(a.OnCluster)
220 }
221 for i, expr := range a.AlterExprs {
222 formatter.Break()
223 formatter.WriteExpr(expr)
224 if i != len(a.AlterExprs)-1 {
225 formatter.WriteString(",")
226 }
227 }
228}
229
230func (a *AlterTableAddColumn) FormatSQL(formatter *Formatter) {
231 formatter.WriteString("ADD COLUMN ")

Callers

nothing calls this directly

Calls 3

WriteStringMethod · 0.80
WriteExprMethod · 0.80
BreakMethod · 0.80

Tested by

no test coverage detected