Skip to content

Commit 6307580

Browse files
committed
cluster mode
1 parent c378583 commit 6307580

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

database/clickhouse/clickhouse.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ func (ch *ClickHouse) Drop() (err error) {
279279

280280
query = "DROP TABLE IF EXISTS " + quoteIdentifier(ch.config.DatabaseName) + "." + quoteIdentifier(table)
281281

282+
if len(ch.config.ClusterName) > 0 {
283+
query = query + " ON CLUSTER " + ch.config.ClusterName
284+
}
285+
282286
if _, err := ch.conn.Exec(query); err != nil {
283287
return &database.Error{OrigErr: err, Query: []byte(query)}
284288
}

0 commit comments

Comments
 (0)