ClickHouse Drop Table
API
For the full list of supported methods, see DropTableQuery.
db.NewDropTable().
Model(&strct).
Table("table1"). // quotes table names
TableExpr("table1"). // arbitrary unsafe expression
ModelTableExpr("table1"). // overrides model table name
IfNotExists().
Exec(ctx)
Example
To drop ClickHouse table:
_, err := db.NewDropTable().Model((*Span)(nil)).IfExists().Exec(ctx)
if err != nil {
panic(err)
}