provide support for on cluster create table queries

This commit is contained in:
Francesco Rivola
2021-12-09 15:04:10 +01:00
parent a84d890a1d
commit caf1343c20
2 changed files with 14 additions and 1 deletions

View File

@@ -492,7 +492,7 @@ class QueryCursor {
// Hack for Sequelize ORM
query = query.trim().trimEnd().replace(/;$/gm, "");
if (query.match(/^(select|show|exists)/i)) {
if (query.match(/^(select|show|exists|create)/i)) {
if ( ! R_FORMAT_PARSER.test(query)) {
query += ` FORMAT ${ClickHouse.getFullFormatName(me.format)}`;
}