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

Method FormatSQL

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

Source from the content-addressed store, hash-verified

228}
229
230func (a *AlterTableAddColumn) FormatSQL(formatter *Formatter) {
231 formatter.WriteString("ADD COLUMN ")
232 if a.IfNotExists {
233 formatter.WriteString("IF NOT EXISTS ")
234 }
235 formatter.WriteExpr(a.Column)
236 if a.After != nil {
237 formatter.WriteString(" AFTER ")
238 formatter.WriteExpr(a.After)
239 }
240 if a.Settings != nil {
241 formatter.Break()
242 formatter.WriteExpr(a.Settings)
243 }
244}
245
246func (a *AlterTableAddIndex) FormatSQL(formatter *Formatter) {
247 formatter.WriteString("ADD ")

Callers

nothing calls this directly

Calls 3

WriteStringMethod · 0.80
WriteExprMethod · 0.80
BreakMethod · 0.80

Tested by

no test coverage detected