Refactoring
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "frog",
|
||||
"displayName": "frog",
|
||||
"description": "The Oracle SQL workbench for VSCode",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"publisher": "todie",
|
||||
"engines": {
|
||||
"vscode": "^1.17.0"
|
||||
|
@@ -34,10 +34,11 @@ export class SessionManager {
|
||||
public set currentConnection(c : ConnectionNode) {
|
||||
this.statusBarItem.text = c.name;
|
||||
if (this.dbSession) this.closeSession();
|
||||
this._currentConnection = c;
|
||||
}
|
||||
|
||||
public get currentConnection() : ConnectionNode {
|
||||
return this.currentConnection;
|
||||
return this._currentConnection;
|
||||
}
|
||||
|
||||
public isSessionActive() : boolean {
|
||||
@@ -51,10 +52,10 @@ export class SessionManager {
|
||||
this.dbSession = null;
|
||||
}
|
||||
|
||||
public check() {
|
||||
public check() : boolean {
|
||||
if (!this.currentConnection) {
|
||||
vscode.window.showWarningMessage('No connection selected');
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
let extPath = vscode.extensions.getExtension("todie.frog").extensionPath;
|
||||
@@ -129,10 +130,11 @@ export class SessionManager {
|
||||
this.dbSession = null;
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public execute(text : string, rowLimit : number) {
|
||||
this.check();
|
||||
if (!this.check()) return;
|
||||
|
||||
this.outputChannel.append("-- " + new Date() + " -------------------------------\n"); //Executing: '" + text + "'\n");
|
||||
let input = { "sql": text, "rowLimit": rowLimit };
|
||||
|
Reference in New Issue
Block a user