@finos/legend-application-query 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderExplorerPanel.js +3 -1
- package/lib/components/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderFetchStructurePanel.js +39 -7
- package/lib/components/QueryBuilderFetchStructurePanel.js.map +1 -1
- package/lib/components/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderFilterPanel.js +59 -15
- package/lib/components/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/QueryBuilderParameterPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParameterPanel.js +3 -2
- package/lib/components/QueryBuilderParameterPanel.js.map +1 -1
- package/lib/components/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderPostFilterPanel.js +29 -7
- package/lib/components/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/QueryBuilderProjectionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderProjectionPanel.js +6 -2
- package/lib/components/QueryBuilderProjectionPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertySearchPanel.js +3 -2
- package/lib/components/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +13 -7
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSetupPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderSetupPanel.js +5 -3
- package/lib/components/QueryBuilderSetupPanel.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +2 -3
- package/lib/stores/QueryBuilderExplorerState.d.ts +1 -1
- package/lib/stores/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderExplorerState.js +13 -3
- package/lib/stores/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/QueryBuilderFetchStructureState.d.ts +2 -1
- package/lib/stores/QueryBuilderFetchStructureState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderFetchStructureState.js +2 -2
- package/lib/stores/QueryBuilderFetchStructureState.js.map +1 -1
- package/lib/stores/QueryBuilderFilterState.d.ts +11 -1
- package/lib/stores/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderFilterState.js +33 -2
- package/lib/stores/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/QueryBuilderOperatorLoader.d.ts +47 -0
- package/lib/stores/QueryBuilderOperatorLoader.d.ts.map +1 -0
- package/lib/stores/QueryBuilderOperatorLoader.js +94 -0
- package/lib/stores/QueryBuilderOperatorLoader.js.map +1 -0
- package/lib/stores/QueryBuilderOperatorsHelper.d.ts +1 -0
- package/lib/stores/QueryBuilderOperatorsHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderOperatorsHelper.js +28 -1
- package/lib/stores/QueryBuilderOperatorsHelper.js.map +1 -1
- package/lib/stores/QueryBuilderPostFilterState.d.ts +5 -2
- package/lib/stores/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPostFilterState.js +25 -1
- package/lib/stores/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts +4 -3
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.js +77 -97
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
- package/lib/stores/QueryBuilderProjectionState.d.ts +4 -2
- package/lib/stores/QueryBuilderProjectionState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderProjectionState.js +24 -28
- package/lib/stores/QueryBuilderProjectionState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertySearchPanelState.js +1 -1
- package/lib/stores/QueryBuilderPropertySearchPanelState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts +5 -2
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +19 -7
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +2 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +11 -58
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderTestUtils.d.ts +24 -0
- package/lib/stores/QueryBuilderTestUtils.d.ts.map +1 -0
- package/lib/stores/QueryBuilderTestUtils.js +49 -0
- package/lib/stores/QueryBuilderTestUtils.js.map +1 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts +24 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.js +89 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -0
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +3 -7
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.js +5 -31
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_Equal.js.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.js +5 -31
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.js +5 -31
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.js +5 -32
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.js +5 -31
- package/lib/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.js +3 -29
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.js +4 -30
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.js +4 -30
- package/lib/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/package.json +9 -10
- package/src/components/QueryBuilderExplorerPanel.tsx +3 -1
- package/src/components/QueryBuilderFetchStructurePanel.tsx +47 -7
- package/src/components/QueryBuilderFilterPanel.tsx +101 -21
- package/src/components/QueryBuilderFunctionsExplorerPanel.tsx +1 -0
- package/src/components/QueryBuilderParameterPanel.tsx +3 -2
- package/src/components/QueryBuilderPostFilterPanel.tsx +53 -7
- package/src/components/QueryBuilderProjectionPanel.tsx +19 -2
- package/src/components/QueryBuilderPropertySearchPanel.tsx +2 -1
- package/src/components/QueryBuilderResultPanel.tsx +75 -46
- package/src/components/QueryBuilderSetupPanel.tsx +5 -3
- package/src/index.ts +2 -4
- package/src/stores/QueryBuilderExplorerState.ts +17 -3
- package/src/stores/QueryBuilderFetchStructureState.ts +9 -2
- package/src/stores/QueryBuilderFilterState.ts +50 -0
- package/src/stores/QueryBuilderOperatorLoader.ts +133 -0
- package/src/stores/QueryBuilderOperatorsHelper.ts +35 -0
- package/src/stores/QueryBuilderPostFilterState.ts +40 -1
- package/src/stores/QueryBuilderPreviewDataHelper.ts +122 -217
- package/src/stores/QueryBuilderProjectionState.ts +40 -42
- package/src/stores/QueryBuilderPropertySearchPanelState.ts +1 -1
- package/src/stores/QueryBuilderResultState.ts +27 -9
- package/src/stores/QueryBuilderState.ts +27 -94
- package/src/stores/QueryBuilderTestUtils.ts +93 -0
- package/src/stores/QueryBuilderTypeaheadHelper.ts +149 -0
- package/src/stores/QueryEditorStore.ts +11 -12
- package/src/stores/filterOperators/QueryBuilderFilterOperator_Equal.ts +6 -35
- package/src/stores/filterOperators/QueryBuilderFilterOperator_GreaterThan.ts +9 -35
- package/src/stores/filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.ts +9 -35
- package/src/stores/filterOperators/QueryBuilderFilterOperator_LessThan.ts +9 -36
- package/src/stores/filterOperators/QueryBuilderFilterOperator_LessThanEqual.ts +9 -35
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_Equal.ts +6 -33
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.ts +11 -36
- package/src/stores/postFilterOperators/QueryBuilderPostFilterOperator_LessThan.ts +11 -36
- package/tsconfig.json +3 -0
@@ -68,30 +68,22 @@ import {
|
|
68
68
|
RawLambda,
|
69
69
|
stub_RawLambda,
|
70
70
|
isStubbed_RawLambda,
|
71
|
-
buildRawLambdaFromLambdaFunction,
|
72
71
|
} from '@finos/legend-graph';
|
73
72
|
import {
|
74
73
|
DEFAULT_LAMBDA_VARIABLE_NAME,
|
75
74
|
QUERY_BUILDER_SOURCE_ID_LABEL,
|
76
75
|
} from '../QueryBuilder_Const.js';
|
77
|
-
import {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
import {
|
82
|
-
import {
|
83
|
-
import { QueryBuilderAggregateOperator_StdDev_Sample } from './aggregateOperators/QueryBuilderAggregateOperator_StdDev_Sample.js';
|
84
|
-
import { QueryBuilderAggregateOperator_DistinctCount } from './aggregateOperators/QueryBuilderAggregateOperator_DistinctCount.js';
|
85
|
-
import { QueryBuilderAggregateOperator_Min } from './aggregateOperators/QueryBuilderAggregateOperator_Min.js';
|
86
|
-
import { QueryBuilderAggregateOperator_Max } from './aggregateOperators/QueryBuilderAggregateOperator_Max.js';
|
87
|
-
import { QueryBuilderAggregateOperator_JoinString } from './aggregateOperators/QueryBuilderAggregateOperator_JoinString.js';
|
76
|
+
import {
|
77
|
+
type QueryBuilderAggregateOperator,
|
78
|
+
QueryBuilderAggregationState,
|
79
|
+
} from './QueryBuilderAggregationState.js';
|
80
|
+
import { buildGenericLambdaFunctionInstanceValue } from './QueryBuilderValueSpecificationBuilderHelper.js';
|
81
|
+
import { LambdaEditorState } from '@finos/legend-application';
|
88
82
|
import {
|
89
83
|
type QueryBuilderPreviewData,
|
90
|
-
buildNonNumericPreviewDataQuery,
|
91
84
|
buildNumericPreviewDataQuery,
|
85
|
+
buildNonNumericPreviewDataQuery,
|
92
86
|
} from './QueryBuilderPreviewDataHelper.js';
|
93
|
-
import { buildGenericLambdaFunctionInstanceValue } from './QueryBuilderValueSpecificationBuilderHelper.js';
|
94
|
-
import { LambdaEditorState } from '@finos/legend-application';
|
95
87
|
|
96
88
|
export enum QUERY_BUILDER_PROJECTION_DND_TYPE {
|
97
89
|
PROJECTION_COLUMN = 'PROJECTION_COLUMN',
|
@@ -380,7 +372,10 @@ export class QueryBuilderProjectionState {
|
|
380
372
|
aggregationState: QueryBuilderAggregationState;
|
381
373
|
isConvertDerivationProjectionObjects = false;
|
382
374
|
|
383
|
-
constructor(
|
375
|
+
constructor(
|
376
|
+
queryBuilderState: QueryBuilderState,
|
377
|
+
operators: QueryBuilderAggregateOperator[],
|
378
|
+
) {
|
384
379
|
makeAutoObservable(this, {
|
385
380
|
queryBuilderState: false,
|
386
381
|
removeColumn: action,
|
@@ -390,18 +385,7 @@ export class QueryBuilderProjectionState {
|
|
390
385
|
});
|
391
386
|
|
392
387
|
this.queryBuilderState = queryBuilderState;
|
393
|
-
this.aggregationState = new QueryBuilderAggregationState(this,
|
394
|
-
new QueryBuilderAggregateOperator_Count(),
|
395
|
-
new QueryBuilderAggregateOperator_DistinctCount(),
|
396
|
-
new QueryBuilderAggregateOperator_Distinct(),
|
397
|
-
new QueryBuilderAggregateOperator_Sum(),
|
398
|
-
new QueryBuilderAggregateOperator_Average(),
|
399
|
-
new QueryBuilderAggregateOperator_Min(),
|
400
|
-
new QueryBuilderAggregateOperator_Max(),
|
401
|
-
new QueryBuilderAggregateOperator_StdDev_Population(),
|
402
|
-
new QueryBuilderAggregateOperator_StdDev_Sample(),
|
403
|
-
new QueryBuilderAggregateOperator_JoinString(),
|
404
|
-
]);
|
388
|
+
this.aggregationState = new QueryBuilderAggregationState(this, operators);
|
405
389
|
}
|
406
390
|
|
407
391
|
*convertDerivationProjectionObjects(): GeneratorFn<void> {
|
@@ -709,13 +693,9 @@ export class QueryBuilderProjectionState {
|
|
709
693
|
case PRIMITIVE_TYPE.FLOAT: {
|
710
694
|
const previewResult =
|
711
695
|
(yield this.queryBuilderState.graphManagerState.graphManager.executeMapping(
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
this.queryBuilderState.querySetupState._class,
|
716
|
-
this.queryBuilderState.graphManagerState.graph,
|
717
|
-
),
|
718
|
-
this.queryBuilderState.graphManagerState,
|
696
|
+
buildNumericPreviewDataQuery(
|
697
|
+
this.queryBuilderState,
|
698
|
+
propertyExpression,
|
719
699
|
),
|
720
700
|
this.queryBuilderState.querySetupState.mapping,
|
721
701
|
runtime,
|
@@ -752,13 +732,9 @@ export class QueryBuilderProjectionState {
|
|
752
732
|
case PRIMITIVE_TYPE.DATETIME: {
|
753
733
|
const previewResult =
|
754
734
|
(yield this.queryBuilderState.graphManagerState.graphManager.executeMapping(
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
this.queryBuilderState.querySetupState._class,
|
759
|
-
this.queryBuilderState.graphManagerState.graph,
|
760
|
-
),
|
761
|
-
this.queryBuilderState.graphManagerState,
|
735
|
+
buildNonNumericPreviewDataQuery(
|
736
|
+
this.queryBuilderState,
|
737
|
+
propertyExpression,
|
762
738
|
),
|
763
739
|
this.queryBuilderState.querySetupState.mapping,
|
764
740
|
runtime,
|
@@ -793,4 +769,26 @@ export class QueryBuilderProjectionState {
|
|
793
769
|
);
|
794
770
|
}
|
795
771
|
}
|
772
|
+
|
773
|
+
isValidProjectionState(): boolean {
|
774
|
+
return Boolean(!this.getValidationErrorMessage());
|
775
|
+
}
|
776
|
+
|
777
|
+
getValidationErrorMessage(): string | undefined {
|
778
|
+
if (this.queryBuilderState.fetchStructureState.isProjectionMode()) {
|
779
|
+
const hasDuplicatedProjectionColumns = this.columns.some(
|
780
|
+
(column) =>
|
781
|
+
this.columns.filter((c) => c.columnName === column.columnName)
|
782
|
+
.length > 1,
|
783
|
+
);
|
784
|
+
if (hasDuplicatedProjectionColumns) {
|
785
|
+
return 'Query has duplicated projection columns';
|
786
|
+
}
|
787
|
+
const hasNoProjectionColumns = this.columns.length === 0;
|
788
|
+
if (hasNoProjectionColumns) {
|
789
|
+
return 'Query has no projection columns';
|
790
|
+
}
|
791
|
+
}
|
792
|
+
return undefined;
|
793
|
+
}
|
796
794
|
}
|
@@ -262,7 +262,7 @@ export class QueryBuilderPropertySearchPanelState {
|
|
262
262
|
),
|
263
263
|
);
|
264
264
|
if (
|
265
|
-
propertyTreeNodeData
|
265
|
+
propertyTreeNodeData?.mappingData.mapped &&
|
266
266
|
!propertyTreeNodeData.isPartOfDerivedPropertyBranch
|
267
267
|
) {
|
268
268
|
nextLevelPropertyNodes.push(propertyTreeNodeData);
|
@@ -48,16 +48,18 @@ export class QueryBuilderResultState {
|
|
48
48
|
queryBuilderState: QueryBuilderState;
|
49
49
|
exportDataState = ActionState.create();
|
50
50
|
previewLimit = DEFAULT_LIMIT;
|
51
|
-
|
51
|
+
isRunningQuery = false;
|
52
52
|
isGeneratingPlan = false;
|
53
53
|
executionResult?: ExecutionResult | undefined;
|
54
54
|
executionPlanState: ExecutionPlanState;
|
55
55
|
executionDuration?: number | undefined;
|
56
|
+
queryRunPromise: Promise<ExecutionResult> | undefined = undefined;
|
56
57
|
|
57
58
|
constructor(queryBuilderState: QueryBuilderState) {
|
58
59
|
makeAutoObservable(this, {
|
59
60
|
queryBuilderState: false,
|
60
61
|
executionPlanState: false,
|
62
|
+
setIsRunningQuery: action,
|
61
63
|
setExecutionResult: action,
|
62
64
|
});
|
63
65
|
|
@@ -68,16 +70,28 @@ export class QueryBuilderResultState {
|
|
68
70
|
);
|
69
71
|
}
|
70
72
|
|
73
|
+
setIsRunningQuery = (val: boolean): void => {
|
74
|
+
this.isRunningQuery = val;
|
75
|
+
};
|
76
|
+
|
71
77
|
setExecutionResult = (val: ExecutionResult | undefined): void => {
|
72
78
|
this.executionResult = val;
|
73
79
|
};
|
80
|
+
|
74
81
|
setExecutionDuration = (val: number | undefined): void => {
|
75
82
|
this.executionDuration = val;
|
76
83
|
};
|
84
|
+
|
77
85
|
setPreviewLimit = (val: number): void => {
|
78
86
|
this.previewLimit = Math.max(1, val);
|
79
87
|
};
|
80
88
|
|
89
|
+
setQueryRunPromise = (
|
90
|
+
promise: Promise<ExecutionResult> | undefined,
|
91
|
+
): void => {
|
92
|
+
this.queryRunPromise = promise;
|
93
|
+
};
|
94
|
+
|
81
95
|
buildExecutionRawLambda(): RawLambda {
|
82
96
|
let query: RawLambda;
|
83
97
|
if (this.queryBuilderState.isQuerySupported()) {
|
@@ -172,9 +186,9 @@ export class QueryBuilderResultState {
|
|
172
186
|
}
|
173
187
|
}
|
174
188
|
|
175
|
-
*
|
189
|
+
*runQuery(): GeneratorFn<void> {
|
176
190
|
try {
|
177
|
-
this.
|
191
|
+
this.isRunningQuery = true;
|
178
192
|
const mapping = guaranteeNonNullable(
|
179
193
|
this.queryBuilderState.querySetupState.mapping,
|
180
194
|
'Mapping is required to execute query',
|
@@ -185,15 +199,19 @@ export class QueryBuilderResultState {
|
|
185
199
|
);
|
186
200
|
const query = this.buildExecutionRawLambda();
|
187
201
|
const startTime = Date.now();
|
188
|
-
const
|
189
|
-
|
202
|
+
const promise =
|
203
|
+
this.queryBuilderState.graphManagerState.graphManager.executeMapping(
|
190
204
|
query,
|
191
205
|
mapping,
|
192
206
|
runtime,
|
193
207
|
this.queryBuilderState.graphManagerState.graph,
|
194
|
-
)
|
195
|
-
this.
|
196
|
-
|
208
|
+
);
|
209
|
+
this.setQueryRunPromise(promise);
|
210
|
+
const result = (yield promise) as ExecutionResult;
|
211
|
+
if (this.queryRunPromise === promise) {
|
212
|
+
this.setExecutionResult(result);
|
213
|
+
this.setExecutionDuration(Date.now() - startTime);
|
214
|
+
}
|
197
215
|
} catch (error) {
|
198
216
|
assertErrorThrown(error);
|
199
217
|
this.queryBuilderState.applicationStore.log.error(
|
@@ -202,7 +220,7 @@ export class QueryBuilderResultState {
|
|
202
220
|
);
|
203
221
|
this.queryBuilderState.applicationStore.notifyError(error);
|
204
222
|
} finally {
|
205
|
-
this.
|
223
|
+
this.setIsRunningQuery(false);
|
206
224
|
}
|
207
225
|
}
|
208
226
|
|
@@ -62,71 +62,20 @@ import {
|
|
62
62
|
buildLambdaVariableExpressions,
|
63
63
|
buildRawLambdaFromLambdaFunction,
|
64
64
|
} from '@finos/legend-graph';
|
65
|
-
import {
|
66
|
-
QueryBuilderFilterOperator_Equal,
|
67
|
-
QueryBuilderFilterOperator_NotEqual,
|
68
|
-
} from './filterOperators/QueryBuilderFilterOperator_Equal.js';
|
69
|
-
import { QueryBuilderFilterOperator_GreaterThan } from './filterOperators/QueryBuilderFilterOperator_GreaterThan.js';
|
70
|
-
import {
|
71
|
-
QueryBuilderFilterOperator_NotStartWith,
|
72
|
-
QueryBuilderFilterOperator_StartWith,
|
73
|
-
} from './filterOperators/QueryBuilderFilterOperator_StartWith.js';
|
74
|
-
import { QueryBuilderFilterOperator_GreaterThanEqual } from './filterOperators/QueryBuilderFilterOperator_GreaterThanEqual.js';
|
75
|
-
import { QueryBuilderFilterOperator_LessThanEqual } from './filterOperators/QueryBuilderFilterOperator_LessThanEqual.js';
|
76
|
-
import { QueryBuilderFilterOperator_LessThan } from './filterOperators/QueryBuilderFilterOperator_LessThan.js';
|
77
|
-
import {
|
78
|
-
QueryBuilderFilterOperator_EndWith,
|
79
|
-
QueryBuilderFilterOperator_NotEndWith,
|
80
|
-
} from './filterOperators/QueryBuilderFilterOperator_EndWith.js';
|
81
|
-
import {
|
82
|
-
QueryBuilderFilterOperator_Contain,
|
83
|
-
QueryBuilderFilterOperator_NotContain,
|
84
|
-
} from './filterOperators/QueryBuilderFilterOperator_Contain.js';
|
85
|
-
import {
|
86
|
-
QueryBuilderFilterOperator_IsEmpty,
|
87
|
-
QueryBuilderFilterOperator_IsNotEmpty,
|
88
|
-
} from './filterOperators/QueryBuilderFilterOperator_IsEmpty.js';
|
89
|
-
import {
|
90
|
-
QueryBuilderFilterOperator_In,
|
91
|
-
QueryBuilderFilterOperator_NotIn,
|
92
|
-
} from './filterOperators/QueryBuilderFilterOperator_In.js';
|
93
65
|
import { buildLambdaFunction } from './QueryBuilderLambdaBuilder.js';
|
94
66
|
import {
|
95
67
|
LambdaParameterState,
|
96
68
|
type GenericLegendApplicationStore,
|
97
69
|
} from '@finos/legend-application';
|
98
70
|
import { QueryBuilderPostFilterState } from './QueryBuilderPostFilterState.js';
|
99
|
-
import {
|
100
|
-
QueryBuilderPostFilterOperator_Equal,
|
101
|
-
QueryBuilderPostFilterOperator_NotEqual,
|
102
|
-
} from './postFilterOperators/QueryBuilderPostFilterOperator_Equal.js';
|
103
|
-
import { QueryBuilderPostFilterOperator_LessThan } from './postFilterOperators/QueryBuilderPostFilterOperator_LessThan.js';
|
104
|
-
import { QueryBuilderPostFilterOperator_LessThanEqual } from './postFilterOperators/QueryBuilderPostFilterOperator_LessThanEqual.js';
|
105
|
-
import { QueryBuilderPostFilterOperator_GreaterThan } from './postFilterOperators/QueryBuilderPostFilterOperator_GreaterThan.js';
|
106
|
-
import { QueryBuilderPostFilterOperator_GreaterThanEqual } from './postFilterOperators/QueryBuilderPostFilterOperator_GreaterThanEqual.js';
|
107
|
-
import {
|
108
|
-
QueryBuilderPostFilterOperator_NotStartWith,
|
109
|
-
QueryBuilderPostFilterOperator_StartWith,
|
110
|
-
} from './postFilterOperators/QueryBuilderPostFilterOperator_StartWith.js';
|
111
|
-
import {
|
112
|
-
QueryBuilderPostFilterOperator_Contain,
|
113
|
-
QueryBuilderPostFilterOperator_NotContain,
|
114
|
-
} from './postFilterOperators/QueryBuilderPostFilterOperator_Contain.js';
|
115
|
-
import {
|
116
|
-
QueryBuilderPostFilterOperator_EndWith,
|
117
|
-
QueryBuilderPostFilterOperator_NotEndWith,
|
118
|
-
} from './postFilterOperators/QueryBuilderPostFilterOperator_EndWith.js';
|
119
71
|
import type { QueryBuilderPostFilterOperator } from './QueryBuilderPostFilterOperator.js';
|
120
|
-
import {
|
121
|
-
QueryBuilderPostFilterOperator_In,
|
122
|
-
QueryBuilderPostFilterOperator_NotIn,
|
123
|
-
} from './postFilterOperators/QueryBuilderPostFilterOperator_In.js';
|
124
|
-
import {
|
125
|
-
QueryBuilderPostFilterOperator_IsEmpty,
|
126
|
-
QueryBuilderPostFilterOperator_IsNotEmpty,
|
127
|
-
} from './postFilterOperators/QueryBuilderPostFilterOperator_IsEmpty.js';
|
128
72
|
import { QueryFunctionsExplorerState } from './QueryFunctionsExplorerState.js';
|
129
73
|
import { QueryParametersState } from './QueryParametersState.js';
|
74
|
+
import {
|
75
|
+
AGGREGATION_OPERATORS,
|
76
|
+
FILTER_OPERATORS,
|
77
|
+
POST_FILTER_OPERATORS,
|
78
|
+
} from './QueryBuilderOperatorLoader.js';
|
130
79
|
|
131
80
|
export abstract class QueryBuilderMode {
|
132
81
|
abstract get isParametersDisabled(): boolean;
|
@@ -179,42 +128,8 @@ export class QueryBuilderState {
|
|
179
128
|
queryTextEditorState: QueryTextEditorState;
|
180
129
|
queryUnsupportedState: QueryBuilderUnsupportedState;
|
181
130
|
observableContext: ObserverContext;
|
182
|
-
filterOperators: QueryBuilderFilterOperator[] =
|
183
|
-
|
184
|
-
new QueryBuilderFilterOperator_NotEqual(),
|
185
|
-
new QueryBuilderFilterOperator_LessThan(),
|
186
|
-
new QueryBuilderFilterOperator_LessThanEqual(),
|
187
|
-
new QueryBuilderFilterOperator_GreaterThan(),
|
188
|
-
new QueryBuilderFilterOperator_GreaterThanEqual(),
|
189
|
-
new QueryBuilderFilterOperator_StartWith(),
|
190
|
-
new QueryBuilderFilterOperator_NotStartWith(),
|
191
|
-
new QueryBuilderFilterOperator_Contain(),
|
192
|
-
new QueryBuilderFilterOperator_NotContain(),
|
193
|
-
new QueryBuilderFilterOperator_EndWith(),
|
194
|
-
new QueryBuilderFilterOperator_NotEndWith(),
|
195
|
-
new QueryBuilderFilterOperator_In(),
|
196
|
-
new QueryBuilderFilterOperator_NotIn(),
|
197
|
-
new QueryBuilderFilterOperator_IsEmpty(),
|
198
|
-
new QueryBuilderFilterOperator_IsNotEmpty(),
|
199
|
-
];
|
200
|
-
postFilterOperators: QueryBuilderPostFilterOperator[] = [
|
201
|
-
new QueryBuilderPostFilterOperator_Equal(),
|
202
|
-
new QueryBuilderPostFilterOperator_NotEqual(),
|
203
|
-
new QueryBuilderPostFilterOperator_LessThan(),
|
204
|
-
new QueryBuilderPostFilterOperator_LessThanEqual(),
|
205
|
-
new QueryBuilderPostFilterOperator_GreaterThan(),
|
206
|
-
new QueryBuilderPostFilterOperator_GreaterThanEqual(),
|
207
|
-
new QueryBuilderPostFilterOperator_StartWith(),
|
208
|
-
new QueryBuilderPostFilterOperator_NotStartWith(),
|
209
|
-
new QueryBuilderPostFilterOperator_Contain(),
|
210
|
-
new QueryBuilderPostFilterOperator_NotContain(),
|
211
|
-
new QueryBuilderPostFilterOperator_EndWith(),
|
212
|
-
new QueryBuilderPostFilterOperator_NotEndWith(),
|
213
|
-
new QueryBuilderPostFilterOperator_In(),
|
214
|
-
new QueryBuilderPostFilterOperator_NotIn(),
|
215
|
-
new QueryBuilderPostFilterOperator_IsEmpty(),
|
216
|
-
new QueryBuilderPostFilterOperator_IsNotEmpty(),
|
217
|
-
];
|
131
|
+
filterOperators: QueryBuilderFilterOperator[] = FILTER_OPERATORS;
|
132
|
+
postFilterOperators: QueryBuilderPostFilterOperator[] = POST_FILTER_OPERATORS;
|
218
133
|
isCompiling = false;
|
219
134
|
backdrop = false;
|
220
135
|
showFunctionPanel = false;
|
@@ -267,7 +182,10 @@ export class QueryBuilderState {
|
|
267
182
|
this.explorerState = new QueryBuilderExplorerState(this);
|
268
183
|
this.queryParametersState = new QueryParametersState(this);
|
269
184
|
this.queryFunctionsExplorerState = new QueryFunctionsExplorerState(this);
|
270
|
-
this.fetchStructureState = new QueryBuilderFetchStructureState(
|
185
|
+
this.fetchStructureState = new QueryBuilderFetchStructureState(
|
186
|
+
this,
|
187
|
+
AGGREGATION_OPERATORS,
|
188
|
+
);
|
271
189
|
this.filterState = new QueryBuilderFilterState(this, this.filterOperators);
|
272
190
|
this.postFilterState = new QueryBuilderPostFilterState(
|
273
191
|
this,
|
@@ -338,7 +256,10 @@ export class QueryBuilderState {
|
|
338
256
|
this.explorerState.refreshTreeData();
|
339
257
|
this.queryParametersState = new QueryParametersState(this);
|
340
258
|
this.queryFunctionsExplorerState = new QueryFunctionsExplorerState(this);
|
341
|
-
const fetchStructureState = new QueryBuilderFetchStructureState(
|
259
|
+
const fetchStructureState = new QueryBuilderFetchStructureState(
|
260
|
+
this,
|
261
|
+
this.fetchStructureState.projectionState.aggregationState.operators,
|
262
|
+
);
|
342
263
|
fetchStructureState.setFetchStructureMode(
|
343
264
|
this.fetchStructureState.fetchStructureMode,
|
344
265
|
);
|
@@ -558,4 +479,16 @@ export class QueryBuilderState {
|
|
558
479
|
this.fetchStructureState.graphFetchTreeState.initialize();
|
559
480
|
}
|
560
481
|
}
|
482
|
+
|
483
|
+
isValidQueryBuilderState(): boolean {
|
484
|
+
return this.fetchStructureState.projectionState.isValidProjectionState();
|
485
|
+
}
|
486
|
+
|
487
|
+
createBareBuilderState(): QueryBuilderState {
|
488
|
+
return new QueryBuilderState(
|
489
|
+
this.applicationStore,
|
490
|
+
this.graphManagerState,
|
491
|
+
this.mode,
|
492
|
+
);
|
493
|
+
}
|
561
494
|
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import { TEST__getTestApplicationStore } from '@finos/legend-application';
|
18
|
+
import {
|
19
|
+
type RawLambda,
|
20
|
+
type RawMappingModelCoverageAnalysisResult,
|
21
|
+
TEST__buildGraphWithEntities,
|
22
|
+
TEST__getTestGraphManagerState,
|
23
|
+
} from '@finos/legend-graph';
|
24
|
+
import type { Entity } from '@finos/legend-storage';
|
25
|
+
import { jest } from '@jest/globals';
|
26
|
+
import { LegendQueryPluginManager } from '../application/LegendQueryPluginManager.js';
|
27
|
+
import { QueryBuilder_GraphManagerPreset } from '../graphManager/QueryBuilder_GraphManagerPreset.js';
|
28
|
+
import {
|
29
|
+
QueryBuilderState,
|
30
|
+
StandardQueryBuilderMode,
|
31
|
+
} from './QueryBuilderState.js';
|
32
|
+
import { TEST__getTestLegendQueryApplicationConfig } from './QueryEditorStoreTestUtils.js';
|
33
|
+
|
34
|
+
export const TEST_setUpQueryBuilderState = async (
|
35
|
+
entities: Entity[],
|
36
|
+
rawLambda?: RawLambda | undefined,
|
37
|
+
executionContext?:
|
38
|
+
| {
|
39
|
+
_class: string;
|
40
|
+
mapping: string;
|
41
|
+
runtime?: string | undefined;
|
42
|
+
}
|
43
|
+
| undefined,
|
44
|
+
rawMappingModelCoverageAnalysisResult?:
|
45
|
+
| RawMappingModelCoverageAnalysisResult
|
46
|
+
| undefined,
|
47
|
+
): Promise<QueryBuilderState> => {
|
48
|
+
const pluginManager = LegendQueryPluginManager.create();
|
49
|
+
pluginManager.usePresets([new QueryBuilder_GraphManagerPreset()]).install();
|
50
|
+
const applicationStore = TEST__getTestApplicationStore(
|
51
|
+
TEST__getTestLegendQueryApplicationConfig(),
|
52
|
+
LegendQueryPluginManager.create(),
|
53
|
+
);
|
54
|
+
const graphManagerState = TEST__getTestGraphManagerState(pluginManager);
|
55
|
+
await TEST__buildGraphWithEntities(graphManagerState, entities);
|
56
|
+
const queryBuilderState = new QueryBuilderState(
|
57
|
+
applicationStore,
|
58
|
+
graphManagerState,
|
59
|
+
new StandardQueryBuilderMode(),
|
60
|
+
);
|
61
|
+
if (rawLambda) {
|
62
|
+
queryBuilderState.buildStateFromRawLambda(rawLambda);
|
63
|
+
}
|
64
|
+
if (executionContext) {
|
65
|
+
const graph = queryBuilderState.graphManagerState.graph;
|
66
|
+
queryBuilderState.querySetupState._class = graph.getClass(
|
67
|
+
executionContext._class,
|
68
|
+
);
|
69
|
+
queryBuilderState.querySetupState.mapping = graph.getMapping(
|
70
|
+
executionContext.mapping,
|
71
|
+
);
|
72
|
+
if (executionContext.runtime) {
|
73
|
+
queryBuilderState.querySetupState.runtimeValue = graph.getRuntime(
|
74
|
+
executionContext.runtime,
|
75
|
+
);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
if (rawMappingModelCoverageAnalysisResult) {
|
79
|
+
jest
|
80
|
+
.spyOn(
|
81
|
+
queryBuilderState.graphManagerState.graphManager,
|
82
|
+
'analyzeMappingModelCoverage',
|
83
|
+
)
|
84
|
+
.mockResolvedValue(
|
85
|
+
queryBuilderState.graphManagerState.graphManager.buildMappingModelCoverageAnalysisResult(
|
86
|
+
rawMappingModelCoverageAnalysisResult,
|
87
|
+
),
|
88
|
+
);
|
89
|
+
|
90
|
+
await queryBuilderState.explorerState.analyzeMappingModelCoverage();
|
91
|
+
}
|
92
|
+
return queryBuilderState;
|
93
|
+
};
|
@@ -0,0 +1,149 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
type AbstractPropertyExpression,
|
19
|
+
type ExecutionResult,
|
20
|
+
type ValueSpecification,
|
21
|
+
PrimitiveInstanceValue,
|
22
|
+
PRIMITIVE_TYPE,
|
23
|
+
TdsExecutionResult,
|
24
|
+
} from '@finos/legend-graph';
|
25
|
+
import { guaranteeType, isNonNullable, isString } from '@finos/legend-shared';
|
26
|
+
import { QueryBuilderPostFilterOperator_StartWith } from './postFilterOperators/QueryBuilderPostFilterOperator_StartWith.js';
|
27
|
+
import type { QueryBuilderAggregateColumnState } from './QueryBuilderAggregationState.js';
|
28
|
+
import {
|
29
|
+
PostFilterConditionState,
|
30
|
+
QueryBuilderPostFilterTreeConditionNodeData,
|
31
|
+
} from './QueryBuilderPostFilterState.js';
|
32
|
+
import {
|
33
|
+
QueryBuilderProjectionColumnState,
|
34
|
+
QueryBuilderSimpleProjectionColumnState,
|
35
|
+
} from './QueryBuilderProjectionState.js';
|
36
|
+
import type { QueryBuilderState } from './QueryBuilderState.js';
|
37
|
+
|
38
|
+
const TYPEAHEAD_TAKE_LIMIT = 10;
|
39
|
+
const START_LENGTH = 3;
|
40
|
+
|
41
|
+
const createAndSetupQueryBuilderStateForTypeAhead = (
|
42
|
+
queryBuilderState: QueryBuilderState,
|
43
|
+
): QueryBuilderState => {
|
44
|
+
// builderState to build dummy query
|
45
|
+
const builderState = queryBuilderState.createBareBuilderState();
|
46
|
+
// setup
|
47
|
+
builderState.querySetupState = queryBuilderState.querySetupState;
|
48
|
+
// result modifiers
|
49
|
+
builderState.resultSetModifierState.distinct = true;
|
50
|
+
builderState.resultSetModifierState.limit = TYPEAHEAD_TAKE_LIMIT;
|
51
|
+
return builderState;
|
52
|
+
};
|
53
|
+
|
54
|
+
const buildColumnTypeAheadQuery = (
|
55
|
+
builderState: QueryBuilderState,
|
56
|
+
columnState:
|
57
|
+
| QueryBuilderProjectionColumnState
|
58
|
+
| QueryBuilderAggregateColumnState,
|
59
|
+
value: ValueSpecification | undefined,
|
60
|
+
): QueryBuilderState => {
|
61
|
+
// projection column
|
62
|
+
let projectionState;
|
63
|
+
if (columnState instanceof QueryBuilderProjectionColumnState) {
|
64
|
+
projectionState = columnState;
|
65
|
+
} else {
|
66
|
+
projectionState = columnState.projectionColumnState;
|
67
|
+
const aggregationState =
|
68
|
+
builderState.fetchStructureState.projectionState.aggregationState;
|
69
|
+
aggregationState.columns = [columnState];
|
70
|
+
}
|
71
|
+
builderState.fetchStructureState.projectionState.columns = [projectionState];
|
72
|
+
// post filter
|
73
|
+
const postConditionState = new PostFilterConditionState(
|
74
|
+
builderState.postFilterState,
|
75
|
+
columnState,
|
76
|
+
value,
|
77
|
+
new QueryBuilderPostFilterOperator_StartWith(),
|
78
|
+
);
|
79
|
+
const postFilterNode = new QueryBuilderPostFilterTreeConditionNodeData(
|
80
|
+
undefined,
|
81
|
+
postConditionState,
|
82
|
+
);
|
83
|
+
builderState.postFilterState.addNodeFromNode(postFilterNode, undefined);
|
84
|
+
return builderState;
|
85
|
+
};
|
86
|
+
|
87
|
+
export const buildPropertyTypeAheadQuery = (
|
88
|
+
queryBuilderState: QueryBuilderState,
|
89
|
+
propertyExpression: AbstractPropertyExpression,
|
90
|
+
value: ValueSpecification | undefined,
|
91
|
+
): QueryBuilderState => {
|
92
|
+
// builderState to build dummy query
|
93
|
+
const builderState =
|
94
|
+
createAndSetupQueryBuilderStateForTypeAhead(queryBuilderState);
|
95
|
+
const projectionState = new QueryBuilderSimpleProjectionColumnState(
|
96
|
+
builderState.fetchStructureState.projectionState,
|
97
|
+
propertyExpression,
|
98
|
+
false,
|
99
|
+
);
|
100
|
+
return buildColumnTypeAheadQuery(builderState, projectionState, value);
|
101
|
+
};
|
102
|
+
|
103
|
+
export const buildProjectionColumnTypeAheadQuery = (
|
104
|
+
queryBuilderState: QueryBuilderState,
|
105
|
+
columnState:
|
106
|
+
| QueryBuilderProjectionColumnState
|
107
|
+
| QueryBuilderAggregateColumnState,
|
108
|
+
value: ValueSpecification | undefined,
|
109
|
+
): QueryBuilderState => {
|
110
|
+
// builderState to build dummy query
|
111
|
+
const builderState =
|
112
|
+
createAndSetupQueryBuilderStateForTypeAhead(queryBuilderState);
|
113
|
+
return buildColumnTypeAheadQuery(builderState, columnState, value);
|
114
|
+
};
|
115
|
+
|
116
|
+
export const buildTypeAheadOptions = (result: ExecutionResult): string[] => {
|
117
|
+
const tdsResult = guaranteeType(
|
118
|
+
result,
|
119
|
+
TdsExecutionResult,
|
120
|
+
'Type ahead search is only supported for tds result sets',
|
121
|
+
);
|
122
|
+
const options: string[] = [];
|
123
|
+
tdsResult.result.rows
|
124
|
+
.map((r) => r.values[0])
|
125
|
+
.filter(isNonNullable)
|
126
|
+
.forEach((r) => {
|
127
|
+
if (isString(r)) {
|
128
|
+
options.push(r);
|
129
|
+
}
|
130
|
+
});
|
131
|
+
return options;
|
132
|
+
};
|
133
|
+
|
134
|
+
export const performTypeAhead = (
|
135
|
+
val: ValueSpecification | undefined,
|
136
|
+
): boolean => {
|
137
|
+
if (val instanceof PrimitiveInstanceValue) {
|
138
|
+
const _type = val.genericType.value.rawType;
|
139
|
+
switch (_type.path) {
|
140
|
+
case PRIMITIVE_TYPE.STRING: {
|
141
|
+
const value = val.values[0] as string;
|
142
|
+
return value.length >= START_LENGTH;
|
143
|
+
}
|
144
|
+
default:
|
145
|
+
return false;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
return false;
|
149
|
+
};
|
@@ -443,22 +443,21 @@ export class CreateQueryEditorStore extends QueryEditorStore {
|
|
443
443
|
),
|
444
444
|
);
|
445
445
|
if (this.classPath) {
|
446
|
-
this.queryBuilderState.
|
447
|
-
this.queryBuilderState.graphManagerState.graph.getClass(this.classPath)
|
446
|
+
this.queryBuilderState.changeClass(
|
447
|
+
this.queryBuilderState.graphManagerState.graph.getClass(this.classPath),
|
448
|
+
);
|
448
449
|
this.queryBuilderState.querySetupState.setClassIsReadOnly(true);
|
449
450
|
} else {
|
450
|
-
this.queryBuilderState.
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
451
|
+
this.queryBuilderState.changeClass(
|
452
|
+
getNullableFirstElement(
|
453
|
+
this.queryBuilderState.querySetupState.mapping
|
454
|
+
? getAllClassMappings(
|
455
|
+
this.queryBuilderState.querySetupState.mapping,
|
456
|
+
).map((classMapping) => classMapping.class.value)
|
457
|
+
: [],
|
458
|
+
),
|
456
459
|
);
|
457
460
|
}
|
458
|
-
|
459
|
-
// initialize query builder state after setting up
|
460
|
-
this.queryBuilderState.resetQueryBuilder();
|
461
|
-
this.queryBuilderState.resetQuerySetup();
|
462
461
|
}
|
463
462
|
|
464
463
|
async getExportConfiguration(): Promise<QueryExportConfiguration> {
|