|
|
@@ -54,14 +54,15 @@ export default class SqlExecutable extends Executable {
|
|
|
|
|
|
static fromJs(executor, executableRaw) {
|
|
|
const executable = new SqlExecutable({
|
|
|
- executor: executor,
|
|
|
database: executableRaw.database,
|
|
|
+ executor: executor,
|
|
|
parsedStatement: executableRaw.parsedStatement
|
|
|
});
|
|
|
executable.executeEnded = executableRaw.executeEnded;
|
|
|
executable.executeStarted = executableRaw.executeStarted;
|
|
|
executable.handle = executableRaw.handle;
|
|
|
executable.history = executableRaw.history;
|
|
|
+ executable.id = executableRaw.id;
|
|
|
executable.logs.errors = executableRaw.logs.errors;
|
|
|
executable.logs.jobs = executableRaw.logs.jobs;
|
|
|
executable.lost = executableRaw.lost;
|
|
|
@@ -74,9 +75,19 @@ export default class SqlExecutable extends Executable {
|
|
|
|
|
|
toJs() {
|
|
|
const executableJs = super.toJs();
|
|
|
- executableJs.type = 'sqlExecutable';
|
|
|
executableJs.database = this.database;
|
|
|
executableJs.parsedStatement = this.parsedStatement;
|
|
|
+ executableJs.type = 'sqlExecutable';
|
|
|
return executableJs;
|
|
|
}
|
|
|
+
|
|
|
+ // TODO: Use this for execute instead of snippet
|
|
|
+ toJson() {
|
|
|
+ return JSON.stringify({
|
|
|
+ id: this.id,
|
|
|
+ statement: this.parsedStatement.statement,
|
|
|
+ database: this.database
|
|
|
+ // session:
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|