[editor] Add additional statement types to automatic multi query execution
@@ -959,6 +959,7 @@ var EditorViewModel = (function() {
self.execute(true); // Execute next, need to wait as we disabled fast click
}, 1000);
}
+ if (self.lastExecutedStatement() && /CREATE|DROP/i.test(self.lastExecutedStatement().firstToken)) {
var match = self.statement().match(/(?:CREATE|DROP)\s+TABLE\s+(?:IF\s+(?:NOT\s+)?EXISTS\s+)?(?:`([^`]+)`|([^;\s]+))\..*/i);
var path = [];
if (match) {
@@ -981,6 +982,7 @@ var EditorViewModel = (function() {
});
}, 5000);
}
+ }
};
self.progress.subscribe(function (val) {
@@ -1981,7 +1983,7 @@ var EditorViewModel = (function() {
};
self.checkDdlNotification = function() {
- if (self.lastExecutedStatement() && /CREATE|DROP|ALTER/i.test(self.lastExecutedStatement().firstToken)) {
+ if (self.lastExecutedStatement() && /ALTER|CREATE|DELETE|DROP|GRANT|INSERT|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i.test(self.lastExecutedStatement().firstToken)) {
self.onDdlExecute();
}
};
