|
|
@@ -25,6 +25,17 @@ export interface ExecutorRaw {
|
|
|
executables: ExecutableRaw[];
|
|
|
}
|
|
|
|
|
|
+export interface ExecutorOptions {
|
|
|
+ connector: KnockoutObservable<Connector>;
|
|
|
+ compute: KnockoutObservable<Compute>;
|
|
|
+ namespace: KnockoutObservable<Namespace>;
|
|
|
+ database: KnockoutObservable<string>;
|
|
|
+ defaultLimit?: KnockoutObservable<number>;
|
|
|
+ isSqlEngine?: boolean;
|
|
|
+ snippet?: Snippet;
|
|
|
+ isOptimizerEnabled?: boolean;
|
|
|
+}
|
|
|
+
|
|
|
export default class Executor {
|
|
|
connector: KnockoutObservable<Connector>;
|
|
|
compute: KnockoutObservable<Compute>;
|
|
|
@@ -38,16 +49,7 @@ export default class Executor {
|
|
|
activeExecutable?: Executable;
|
|
|
variables: VariableIndex = {};
|
|
|
|
|
|
- constructor(options: {
|
|
|
- connector: KnockoutObservable<Connector>;
|
|
|
- compute: KnockoutObservable<Compute>;
|
|
|
- namespace: KnockoutObservable<Namespace>;
|
|
|
- database: KnockoutObservable<string>;
|
|
|
- defaultLimit?: KnockoutObservable<number>;
|
|
|
- isSqlEngine?: boolean;
|
|
|
- snippet?: Snippet;
|
|
|
- isOptimizerEnabled?: boolean;
|
|
|
- }) {
|
|
|
+ constructor(options: ExecutorOptions) {
|
|
|
this.connector = options.connector;
|
|
|
this.compute = options.compute;
|
|
|
this.namespace = options.namespace;
|