mirror of
https://github.com/lingble/clickhouse.git
synced 2025-11-21 21:34:51 +00:00
Support for ALTER query
This commit is contained in:
2
index.js
2
index.js
@@ -149,7 +149,7 @@ class ClickHouse {
|
|||||||
|
|
||||||
// 'INSERT INTO t VALUES (1),(2),(3)' || 'SELECT date, count() FROM log WHERE siteId = '123'
|
// 'INSERT INTO t VALUES (1),(2),(3)' || 'SELECT date, count() FROM log WHERE siteId = '123'
|
||||||
else if (opts.query && ! opts.body) {
|
else if (opts.query && ! opts.body) {
|
||||||
if ( ! opts.query.match(/^insert/i) && (!opts.query.match(/^create/i)) && !opts.query.match(/^drop/i)) {
|
if (!opts.query.match(/^(insert|create|drop|alter)/i)) {
|
||||||
opts.query += ' FORMAT TabSeparatedWithNamesAndTypes';
|
opts.query += ' FORMAT TabSeparatedWithNamesAndTypes';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user