Merge pull request #4032 from mechanarchy/patch-1

Ignore SQL comments in query console
This commit is contained in:
zadam
2023-06-26 23:05:42 +02:00
committed by GitHub

View File

@@ -33,6 +33,12 @@ function execute(req) {
for (let query of queries) {
query = query.trim();
while (query.startsWith('-- ') {
// Query starts with one or more SQL comments, discard these before we execute.
const pivot = query.indexOf('\n');
query = pivot > 0 ? query.substr(pivot + 1).trim() : "";
}
if (!query) {
continue;
}