mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Some refactoring of sqleditor.js.
This commit is contained in:
committed by
Dave Page
parent
234efc3be7
commit
5887fb3815
@@ -224,22 +224,22 @@ class ExecuteQuery {
|
||||
}
|
||||
|
||||
if (this.userManagement.isPgaLoginRequired(httpMessage.response)) {
|
||||
this.sqlServerObject.saveState('execute', [this.explainPlan]);
|
||||
this.sqlServerObject.saveState('check_data_changes_to_execute_query', [this.explainPlan]);
|
||||
this.userManagement.pgaLogin();
|
||||
}
|
||||
|
||||
if (httpErrorHandler.httpResponseRequiresNewTransaction(httpMessage.response)) {
|
||||
this.sqlServerObject.saveState('execute', [this.explainPlan]);
|
||||
this.sqlServerObject.saveState('check_data_changes_to_execute_query', [this.explainPlan]);
|
||||
this.sqlServerObject.initTransaction();
|
||||
}
|
||||
|
||||
if (this.wasDatabaseConnectionLost(httpMessage)) {
|
||||
this.sqlServerObject.saveState('execute', [this.explainPlan]);
|
||||
this.sqlServerObject.saveState('check_data_changes_to_execute_query', [this.explainPlan]);
|
||||
this.sqlServerObject.handle_connection_lost(false, httpMessage);
|
||||
}
|
||||
|
||||
if(this.isCryptKeyMissing(httpMessage)) {
|
||||
this.sqlServerObject.saveState('execute', [this.explainPlan]);
|
||||
this.sqlServerObject.saveState('check_data_changes_to_execute_query', [this.explainPlan]);
|
||||
this.sqlServerObject.handle_cryptkey_missing();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -39,13 +39,8 @@ let queryToolActions = {
|
||||
},
|
||||
|
||||
executeQuery: function (sqlEditorController) {
|
||||
if(sqlEditorController.is_query_tool) {
|
||||
this._clearMessageTab();
|
||||
sqlEditorController.execute();
|
||||
} else {
|
||||
this._clearMessageTab();
|
||||
sqlEditorController.execute_data_query();
|
||||
}
|
||||
this._clearMessageTab();
|
||||
sqlEditorController.check_data_changes_to_execute_query();
|
||||
},
|
||||
|
||||
explainAnalyze: function (sqlEditorController) {
|
||||
@@ -60,7 +55,7 @@ let queryToolActions = {
|
||||
settings: this._settings(),
|
||||
};
|
||||
this._clearMessageTab();
|
||||
sqlEditorController.execute(explainObject);
|
||||
sqlEditorController.check_data_changes_to_execute_query(explainObject);
|
||||
},
|
||||
|
||||
explain: function (sqlEditorController) {
|
||||
@@ -76,7 +71,7 @@ let queryToolActions = {
|
||||
settings: this._settings(),
|
||||
};
|
||||
this._clearMessageTab();
|
||||
sqlEditorController.execute(explainObject);
|
||||
sqlEditorController.check_data_changes_to_execute_query(explainObject);
|
||||
},
|
||||
|
||||
download: function (sqlEditorController) {
|
||||
|
||||
Reference in New Issue
Block a user