Support for ALTER query

This commit is contained in:
Vadim Baryshev
2017-07-01 10:34:20 +03:00
parent 12904ea414
commit 1b14fdfa57

View File

@@ -149,7 +149,7 @@ class ClickHouse {
// 'INSERT INTO t VALUES (1),(2),(3)' || 'SELECT date, count() FROM log WHERE siteId = '123'
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';
}