We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e0a976 commit f66777fCopy full SHA for f66777f
index.js
@@ -611,7 +611,9 @@ class ClickHouse {
611
reqParams['formData'] = formData;
612
}
613
} else if (query.match(/^insert/i)) {
614
- reqParams['url'] = me.url + '?query=' + encodeURIComponent(query + ' FORMAT TabSeparated') + '&' + querystring.stringify(configQS);
+ var formatQuery = ''
615
+ if (!query.match(/ format /i)) formatQuery = ' FORMAT TabSeparated'
616
+ reqParams['url'] = me.url + '?query=' + encodeURIComponent(query + formatQuery) + '&' + querystring.stringify(configQS);
617
618
if (me.opts.username) {
619
reqParams['url'] = reqParams['url'] + '&user=' + me.opts.username;
0 commit comments