@finos/legend-application-query 5.2.6 → 5.2.7
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/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +22 -11
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +12 -7
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderSetupPanel.js +1 -1
- package/lib/components/QueryBuilderSetupPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts +1 -2
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +14 -16
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +2 -2
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +22 -105
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -2
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +8 -10
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +23 -17
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts +2 -2
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js +15 -12
- package/lib/components/fetch-structure/QueryBuilderProjectionPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +2 -2
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +23 -28
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +7 -7
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +1 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +5 -3
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +7 -7
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.js +17 -14
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +34 -24
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +1 -2
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +17 -26
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +124 -0
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -0
- package/lib/stores/QueryBuilderStateBuilder.js +310 -0
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -0
- package/lib/stores/{QueryBuilderTestUtils.d.ts → QueryBuilderStateTestUtils.d.ts} +2 -2
- package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderTestUtils.js → QueryBuilderStateTestUtils.js} +2 -2
- package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -0
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +14 -12
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts +3 -11
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +10 -319
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts +27 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +153 -0
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +37 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +79 -2
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +12 -11
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +53 -20
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.d.ts +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.js +3 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchPanelState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +17 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +10 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts +3 -20
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +31 -73
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +17 -4
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +110 -21
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +20 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +62 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts +2 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +3 -8
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts +9 -2
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js +28 -5
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +2 -2
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts +10 -2
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +102 -39
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts +25 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js +186 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts +9 -4
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js +129 -13
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts +20 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js +96 -0
- package/lib/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/{QueryBuilderPostFilterValueSpecificationProcessor.d.ts → QueryBuilderPostFilterStateBuilder.d.ts} +4 -3
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/{QueryBuilderPostFilterValueSpecificationProcessor.js → QueryBuilderPostFilterStateBuilder.js} +30 -21
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +1 -4
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts +19 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +74 -0
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -0
- package/lib/stores/filter/{QueryBuilderValueSpecificationBuilder.d.ts → QueryBuilderFilterValueSpecificationBuilder.d.ts} +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/filter/{QueryBuilderValueSpecificationBuilder.js → QueryBuilderFilterValueSpecificationBuilder.js} +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js +5 -5
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js.map +1 -1
- package/package.json +14 -14
- package/src/components/QueryBuilder.tsx +47 -28
- package/src/components/QueryBuilderResultPanel.tsx +21 -14
- package/src/components/QueryBuilderSetupPanel.tsx +1 -1
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +23 -38
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +2 -2
- package/src/components/fetch-structure/QueryBuilderFetchStructurePanel.tsx +41 -175
- package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +9 -12
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +62 -28
- package/src/components/fetch-structure/QueryBuilderProjectionPanel.tsx +74 -48
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +33 -41
- package/src/components/filter/QueryBuilderFilterPanel.tsx +7 -7
- package/src/components/shared/QueryBuilderPanelIssueCountBadge.tsx +3 -1
- package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +5 -8
- package/src/stores/QueryBuilderPreviewDataHelper.ts +27 -18
- package/src/stores/QueryBuilderPropertyEditorState.ts +40 -31
- package/src/stores/QueryBuilderState.ts +26 -32
- package/src/stores/QueryBuilderStateBuilder.ts +584 -0
- package/src/stores/{QueryBuilderTestUtils.ts → QueryBuilderStateTestUtils.ts} +1 -1
- package/src/stores/QueryBuilderTypeaheadHelper.ts +23 -16
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +24 -584
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +248 -0
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +114 -0
- package/src/stores/explorer/QueryBuilderExplorerState.ts +73 -33
- package/src/stores/explorer/QueryBuilderPropertySearchPanelState.ts +3 -1
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +33 -2
- package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +53 -118
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +166 -26
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +131 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +10 -19
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.ts +68 -4
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +2 -2
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +172 -67
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.ts +426 -0
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +266 -21
- package/src/stores/fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.ts +228 -0
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/{QueryBuilderPostFilterValueSpecificationProcessor.ts → QueryBuilderPostFilterStateBuilder.ts} +68 -48
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +1 -11
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +155 -0
- package/src/stores/filter/{QueryBuilderValueSpecificationBuilder.ts → QueryBuilderFilterValueSpecificationBuilder.ts} +0 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperatorHelper.ts +5 -5
- package/tsconfig.json +10 -5
- package/tsconfig.package.json +1 -1
- package/lib/stores/QueryBuilderTestUtils.d.ts.map +0 -1
- package/lib/stores/QueryBuilderTestUtils.js.map +0 -1
- package/lib/stores/QueryBuilderValueSpecificationProcessor.d.ts +0 -56
- package/lib/stores/QueryBuilderValueSpecificationProcessor.d.ts.map +0 -1
- package/lib/stores/QueryBuilderValueSpecificationProcessor.js +0 -548
- package/lib/stores/QueryBuilderValueSpecificationProcessor.js.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationProcessor.js.map +0 -1
- package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/filter/QueryBuilderValueSpecificationBuilder.js.map +0 -1
- package/src/stores/QueryBuilderValueSpecificationProcessor.ts +0 -1254
@@ -0,0 +1,310 @@
|
|
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
|
+
import { assertNonNullable, assertTrue, assertType, guaranteeType, UnsupportedOperationError, } from '@finos/legend-shared';
|
17
|
+
import { MILESTONING_STEREOTYPE, matchFunctionName, Class, SimpleFunctionExpression, getMilestoneTemporalStereotype, } from '@finos/legend-graph';
|
18
|
+
import { processTDSPostFilterExpression } from './fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js';
|
19
|
+
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../QueryBuilder_Const.js';
|
20
|
+
import { LambdaParameterState } from '@finos/legend-application';
|
21
|
+
import { processFilterExpression } from './filter/QueryBuilderFilterStateBuilder.js';
|
22
|
+
import { processTDSAggregateExpression, processTDSGroupByExpression, } from './fetch-structure/projection/aggregation/QueryBuilderAggregationStateBuilder.js';
|
23
|
+
import { processGraphFetchExpression, processGraphFetchSerializeExpression, } from './fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js';
|
24
|
+
import { processTDSDistinctExpression, processTDSProjectExpression, processTDSProjectionColumnPropertyExpression, processTDSProjectionDerivationExpression, processTDSSortDirectionExpression, processTDSSortExpression, processTDSTakeExpression, } from './fetch-structure/projection/QueryBuilderProjectionStateBuilder.js';
|
25
|
+
const processGetAllExpression = (expression, queryBuilderState) => {
|
26
|
+
const _class = expression.genericType?.value.rawType;
|
27
|
+
assertType(_class, Class, `Can't process getAll() expression: getAll() return type is missing`);
|
28
|
+
queryBuilderState.querySetupState.setClass(_class, true);
|
29
|
+
queryBuilderState.explorerState.refreshTreeData();
|
30
|
+
// check parameters (milestoning) and build state
|
31
|
+
let acceptedNoOfParameters = 1;
|
32
|
+
const stereotype = getMilestoneTemporalStereotype(_class, queryBuilderState.graphManagerState.graph);
|
33
|
+
switch (stereotype) {
|
34
|
+
case MILESTONING_STEREOTYPE.BITEMPORAL:
|
35
|
+
acceptedNoOfParameters = 3;
|
36
|
+
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: when used with a bitemporal milestoned class getAll() expects two parameters`);
|
37
|
+
queryBuilderState.querySetupState.setProcessingDate(expression.parametersValues[1]);
|
38
|
+
queryBuilderState.querySetupState.setBusinessDate(expression.parametersValues[2]);
|
39
|
+
break;
|
40
|
+
case MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL:
|
41
|
+
acceptedNoOfParameters = 2;
|
42
|
+
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`);
|
43
|
+
queryBuilderState.querySetupState.setBusinessDate(expression.parametersValues[1]);
|
44
|
+
break;
|
45
|
+
case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL:
|
46
|
+
acceptedNoOfParameters = 2;
|
47
|
+
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`);
|
48
|
+
queryBuilderState.querySetupState.setProcessingDate(expression.parametersValues[1]);
|
49
|
+
break;
|
50
|
+
default:
|
51
|
+
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: getAll() expects no arguments`);
|
52
|
+
}
|
53
|
+
};
|
54
|
+
/**
|
55
|
+
* This is the value specification processor (a.k.a state builder) for query builder.
|
56
|
+
*
|
57
|
+
* Unlike value specification builder which takes care of transforming the value specification
|
58
|
+
* from `protocol` to `metamodel`, and doing some (naive) type-inferencing, the processor takes care
|
59
|
+
* of traversing the query, analyzing it to build the query builder state. The processor represents
|
60
|
+
* a particular way we want to look at the query, if the query is not like what the processor
|
61
|
+
* expects, or understands, query builder state could not be built, i.e. the query will be deemed
|
62
|
+
* unsupported by query builder
|
63
|
+
*
|
64
|
+
* NOTE: While traversing the expression, this processor also does a fair amount of
|
65
|
+
* validations and assertions--enough to properly build the state. Unlike the builder,
|
66
|
+
* the processor should NEVER modify the metamodel, just traversing it.
|
67
|
+
*/
|
68
|
+
export class QueryBuilderValueSpecificationProcessor {
|
69
|
+
queryBuilderState;
|
70
|
+
/**
|
71
|
+
* A value specification is a tree of value specifications.
|
72
|
+
*
|
73
|
+
* This structure may not intuitively correspond to how we write it in Pure
|
74
|
+
* For example, consider the following expression in Pure:
|
75
|
+
*
|
76
|
+
* | Person.all()->filter(x|$x.age > 0)->project([x|$x.name], ['Name'])->sort([desc('Name')]);
|
77
|
+
*
|
78
|
+
* which is equivalent to the more cryptic version:
|
79
|
+
*
|
80
|
+
* | sort(project(filter(all(Person), x|$x.age > 0), [x|$x.name], ['Name']), [desc('Name')]);
|
81
|
+
*
|
82
|
+
* Hence, the metamodel looks something like this (with some parts redacted)
|
83
|
+
* {
|
84
|
+
* "function": "sort",
|
85
|
+
* "parameters": [
|
86
|
+
* {
|
87
|
+
* "function": "project",
|
88
|
+
* "parameters": [
|
89
|
+
* {
|
90
|
+
* "function": "filter",
|
91
|
+
* "parameters": [
|
92
|
+
* {
|
93
|
+
* "function": "getAll",
|
94
|
+
* ...
|
95
|
+
* },
|
96
|
+
* ... // filter() expression
|
97
|
+
* ]
|
98
|
+
* },
|
99
|
+
* ... // project() expression column and alias
|
100
|
+
* ]
|
101
|
+
* },
|
102
|
+
* {
|
103
|
+
* "_type": "collection",
|
104
|
+
* "values": [
|
105
|
+
* {
|
106
|
+
* "function": "desc",
|
107
|
+
* ... // desc() expression
|
108
|
+
* }
|
109
|
+
* ]
|
110
|
+
* }
|
111
|
+
* ]
|
112
|
+
* }
|
113
|
+
*
|
114
|
+
* The first grammar form is farily declarative in nature and perhaps more intuitive.
|
115
|
+
* We tend to think, in terms of order of running:
|
116
|
+
* all() --> filter() --> project() --> sort()
|
117
|
+
*
|
118
|
+
* However, in reality, when the expression is used or read, the order of traversal is reversed:
|
119
|
+
* sort() --> project() --> filter() --> all()
|
120
|
+
*
|
121
|
+
* Now, in the context of the value specification processor, we need information about preceding
|
122
|
+
* expression in order to validate the usage context of functions, (for example, we want to only
|
123
|
+
* support project() after all() or filter()). In the case of function expression chain,
|
124
|
+
* we have to look at the function expression first parameter. There are some other context,
|
125
|
+
* such as what happens within the second parameter of the sort() expression
|
126
|
+
* in this case, we have the desc() expression, but it's not part of the main expression chain;
|
127
|
+
* however, we need to verify desc() is used within sort(), in this case, we have to record
|
128
|
+
* the parent expression. This is when the following attribute comes into use when processing
|
129
|
+
* value specification.
|
130
|
+
*/
|
131
|
+
parentExpression;
|
132
|
+
constructor(queryBuilderState, parentExpression) {
|
133
|
+
this.queryBuilderState = queryBuilderState;
|
134
|
+
this.parentExpression = parentExpression;
|
135
|
+
}
|
136
|
+
static process(valueSpecification, queryBuilderState) {
|
137
|
+
valueSpecification.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(queryBuilderState, undefined));
|
138
|
+
}
|
139
|
+
/**
|
140
|
+
* Process value specification with information about parent function expression
|
141
|
+
* in order to be used in some validation/assertion
|
142
|
+
*/
|
143
|
+
static processChild(valueSpecification, parentExpression, queryBuilderState) {
|
144
|
+
valueSpecification.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(queryBuilderState, parentExpression));
|
145
|
+
}
|
146
|
+
visit_INTERNAL__UnknownValueSpecification(valueSpecification) {
|
147
|
+
assertNonNullable(this.parentExpression, `Can't process unknown value: parent expression cannot be retrieved`);
|
148
|
+
if (matchFunctionName(this.parentExpression.functionName, [
|
149
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
|
150
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
|
151
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG,
|
152
|
+
])) {
|
153
|
+
processTDSProjectionDerivationExpression(valueSpecification, this.parentExpression, this.queryBuilderState);
|
154
|
+
return;
|
155
|
+
}
|
156
|
+
throw new UnsupportedOperationError(`Can't process unknown value with parent expression of function ${this.parentExpression.functionName}()`);
|
157
|
+
}
|
158
|
+
visit_RootGraphFetchTreeInstanceValue(valueSpecification) {
|
159
|
+
throw new UnsupportedOperationError();
|
160
|
+
}
|
161
|
+
visit_PropertyGraphFetchTreeInstanceValue(valueSpecification) {
|
162
|
+
throw new UnsupportedOperationError();
|
163
|
+
}
|
164
|
+
visit_AlloySerializationConfigInstanceValue(valueSpecification) {
|
165
|
+
throw new UnsupportedOperationError();
|
166
|
+
}
|
167
|
+
visit_PrimitiveInstanceValue(valueSpecification) {
|
168
|
+
throw new UnsupportedOperationError();
|
169
|
+
}
|
170
|
+
visit_EnumValueInstanceValue(valueSpecification) {
|
171
|
+
throw new UnsupportedOperationError();
|
172
|
+
}
|
173
|
+
visit_RuntimeInstanceValue(valueSpecification) {
|
174
|
+
throw new UnsupportedOperationError();
|
175
|
+
}
|
176
|
+
visit_PairInstanceValue(valueSpecification) {
|
177
|
+
throw new UnsupportedOperationError();
|
178
|
+
}
|
179
|
+
visit_MappingInstanceValue(valueSpecification) {
|
180
|
+
throw new UnsupportedOperationError();
|
181
|
+
}
|
182
|
+
visit_PureListInstanceValue(valueSpecification) {
|
183
|
+
throw new UnsupportedOperationError();
|
184
|
+
}
|
185
|
+
visit_CollectionInstanceValue(valueSpecification) {
|
186
|
+
throw new UnsupportedOperationError();
|
187
|
+
}
|
188
|
+
visit_FunctionExpression(valueSpecification) {
|
189
|
+
throw new UnsupportedOperationError();
|
190
|
+
}
|
191
|
+
visit_INTERNAL__PropagatedValue(valueSpecification) {
|
192
|
+
throw new UnsupportedOperationError();
|
193
|
+
}
|
194
|
+
visit_SimpleFunctionExpression(valueSpecification) {
|
195
|
+
const functionName = valueSpecification.functionName;
|
196
|
+
if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL)) {
|
197
|
+
processGetAllExpression(valueSpecification, this.queryBuilderState);
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
else if (matchFunctionName(functionName, [
|
201
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.FILTER,
|
202
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER,
|
203
|
+
])) {
|
204
|
+
// NOTE: for filter, since it sometimes can be ambiguous
|
205
|
+
// whether meta::pure::functions::collection::filter() was used
|
206
|
+
// or meta::pure::tds::filter() was used, we have to have custom logic
|
207
|
+
// to determine
|
208
|
+
// check parameters
|
209
|
+
assertTrue(valueSpecification.parametersValues.length === 2, `Can't process filter() expression: filter() expects 1 argument`);
|
210
|
+
// check preceding expression
|
211
|
+
const precedingExpression = guaranteeType(valueSpecification.parametersValues[0], SimpleFunctionExpression, `Can't process filter() expression: only support filter() immediately following an expression`);
|
212
|
+
QueryBuilderValueSpecificationProcessor.process(precedingExpression, this.queryBuilderState);
|
213
|
+
if (matchFunctionName(precedingExpression.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL)) {
|
214
|
+
assertTrue(matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.FILTER), `Can't process filter() expression: only supports ${QUERY_BUILDER_SUPPORTED_FUNCTIONS.FILTER}() immediately following getAll() (got '${functionName}')`);
|
215
|
+
processFilterExpression(valueSpecification, this.queryBuilderState);
|
216
|
+
return;
|
217
|
+
}
|
218
|
+
else if (matchFunctionName(precedingExpression.functionName, [
|
219
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
|
220
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
|
221
|
+
])) {
|
222
|
+
assertTrue(matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER), `Can't process post-filter expression: only supports ${QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER}() immediately following project()/groupBy() (got '${functionName}')`);
|
223
|
+
processTDSPostFilterExpression(valueSpecification, this.queryBuilderState);
|
224
|
+
return;
|
225
|
+
}
|
226
|
+
else {
|
227
|
+
throw new UnsupportedOperationError(`Can't process filter() expression: only support filter() immediately following getAll() or project()/groupBy()`);
|
228
|
+
}
|
229
|
+
}
|
230
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT)) {
|
231
|
+
processTDSProjectExpression(valueSpecification, this.queryBuilderState);
|
232
|
+
return;
|
233
|
+
}
|
234
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_TAKE)) {
|
235
|
+
processTDSTakeExpression(valueSpecification, this.queryBuilderState);
|
236
|
+
return;
|
237
|
+
}
|
238
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DISTINCT)) {
|
239
|
+
processTDSDistinctExpression(valueSpecification, this.queryBuilderState);
|
240
|
+
return;
|
241
|
+
}
|
242
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_SORT)) {
|
243
|
+
processTDSSortExpression(valueSpecification, this.queryBuilderState);
|
244
|
+
return;
|
245
|
+
}
|
246
|
+
else if (matchFunctionName(functionName, [
|
247
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_ASC,
|
248
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DESC,
|
249
|
+
])) {
|
250
|
+
processTDSSortDirectionExpression(valueSpecification, this.parentExpression, this.queryBuilderState);
|
251
|
+
return;
|
252
|
+
}
|
253
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY)) {
|
254
|
+
processTDSGroupByExpression(valueSpecification, this.queryBuilderState);
|
255
|
+
return;
|
256
|
+
}
|
257
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG)) {
|
258
|
+
processTDSAggregateExpression(valueSpecification, this.parentExpression, this.queryBuilderState);
|
259
|
+
return;
|
260
|
+
}
|
261
|
+
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.SERIALIZE)) {
|
262
|
+
processGraphFetchSerializeExpression(valueSpecification, this.queryBuilderState);
|
263
|
+
return;
|
264
|
+
}
|
265
|
+
else if (matchFunctionName(functionName, [
|
266
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GRAPH_FETCH_CHECKED,
|
267
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GRAPH_FETCH,
|
268
|
+
])) {
|
269
|
+
processGraphFetchExpression(valueSpecification, this.queryBuilderState);
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
throw new UnsupportedOperationError(`Can't process expression of function ${functionName}()`);
|
273
|
+
}
|
274
|
+
visit_VariableExpression(valueSpecification) {
|
275
|
+
throw new UnsupportedOperationError();
|
276
|
+
}
|
277
|
+
visit_LambdaFunctionInstanceValue(valueSpecification) {
|
278
|
+
valueSpecification.values.forEach((value) => value.expressionSequence.forEach((expression) => expression.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(this.queryBuilderState, this.parentExpression))));
|
279
|
+
}
|
280
|
+
visit_AbstractPropertyExpression(valueSpecification) {
|
281
|
+
assertNonNullable(this.parentExpression, `Can't process property expression: parent expression cannot be retrieved`);
|
282
|
+
if (matchFunctionName(this.parentExpression.functionName, [
|
283
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
|
284
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
|
285
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG,
|
286
|
+
])) {
|
287
|
+
processTDSProjectionColumnPropertyExpression(valueSpecification, this.queryBuilderState);
|
288
|
+
return;
|
289
|
+
}
|
290
|
+
throw new UnsupportedOperationError(`Can't process property expression with parent expression of function ${this.parentExpression.functionName}()`);
|
291
|
+
}
|
292
|
+
visit_InstanceValue(valueSpecification) {
|
293
|
+
throw new UnsupportedOperationError();
|
294
|
+
}
|
295
|
+
}
|
296
|
+
export const processParameters = (parameters, queryBuilderState) => {
|
297
|
+
const queryParameterState = queryBuilderState.queryParametersState;
|
298
|
+
parameters.forEach((parameter) => {
|
299
|
+
const parameterState = new LambdaParameterState(parameter, queryBuilderState.observableContext, queryBuilderState.graphManagerState.graph);
|
300
|
+
parameterState.mockParameterValue();
|
301
|
+
queryParameterState.addParameter(parameterState);
|
302
|
+
});
|
303
|
+
};
|
304
|
+
export const processQueryLambdaFunction = (lambdaFunction, queryBuilderState) => {
|
305
|
+
if (lambdaFunction.functionType.parameters.length) {
|
306
|
+
processParameters(lambdaFunction.functionType.parameters, queryBuilderState);
|
307
|
+
}
|
308
|
+
lambdaFunction.expressionSequence.map((expression) => QueryBuilderValueSpecificationProcessor.process(expression, queryBuilderState));
|
309
|
+
};
|
310
|
+
//# sourceMappingURL=QueryBuilderStateBuilder.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderStateBuilder.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,aAAa,EACb,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAcL,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,EAIL,wBAAwB,EAGxB,8BAA8B,GAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gFAAgF,CAAC;AAChI,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACj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CACnD,uCAAuC,CAAC,OAAO,CAC7C,UAAU,EACV,iBAAiB,CAClB,CACF,CAAC;AACJ,CAAC,CAAC"}
|
@@ -16,9 +16,9 @@
|
|
16
16
|
import { type RawLambda, type RawMappingModelCoverageAnalysisResult } from '@finos/legend-graph';
|
17
17
|
import type { Entity } from '@finos/legend-storage';
|
18
18
|
import { QueryBuilderState } from './QueryBuilderState.js';
|
19
|
-
export declare const
|
19
|
+
export declare const TEST__setUpQueryBuilderState: (entities: Entity[], rawLambda?: RawLambda | undefined, executionContext?: {
|
20
20
|
_class: string;
|
21
21
|
mapping: string;
|
22
22
|
runtime?: string | undefined;
|
23
23
|
} | undefined, rawMappingModelCoverageAnalysisResult?: RawMappingModelCoverageAnalysisResult | undefined) => Promise<QueryBuilderState>;
|
24
|
-
//# sourceMappingURL=
|
24
|
+
//# sourceMappingURL=QueryBuilderStateTestUtils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderStateTestUtils.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderStateTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,qCAAqC,EAG3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAGhC,eAAO,MAAM,4BAA4B,aAC7B,MAAM,EAAE,cACN,SAAS,GAAG,SAAS,qBAE7B;IACE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,GACD,SAAS,0CAET,qCAAqC,GACrC,SAAS,KACZ,QAAQ,iBAAiB,CAgD3B,CAAC"}
|
@@ -21,7 +21,7 @@ import { LegendQueryPluginManager } from '../application/LegendQueryPluginManage
|
|
21
21
|
import { QueryBuilder_GraphManagerPreset } from '../graphManager/QueryBuilder_GraphManagerPreset.js';
|
22
22
|
import { QueryBuilderState, StandardQueryBuilderMode, } from './QueryBuilderState.js';
|
23
23
|
import { TEST__getTestLegendQueryApplicationConfig } from './QueryEditorStoreTestUtils.js';
|
24
|
-
export const
|
24
|
+
export const TEST__setUpQueryBuilderState = async (entities, rawLambda, executionContext, rawMappingModelCoverageAnalysisResult) => {
|
25
25
|
const pluginManager = LegendQueryPluginManager.create();
|
26
26
|
pluginManager.usePresets([new QueryBuilder_GraphManagerPreset()]).install();
|
27
27
|
const applicationStore = TEST__getTestApplicationStore(TEST__getTestLegendQueryApplicationConfig(), LegendQueryPluginManager.create());
|
@@ -47,4 +47,4 @@ export const TEST_setUpQueryBuilderState = async (entities, rawLambda, execution
|
|
47
47
|
}
|
48
48
|
return queryBuilderState;
|
49
49
|
};
|
50
|
-
//# sourceMappingURL=
|
50
|
+
//# sourceMappingURL=QueryBuilderStateTestUtils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderStateTestUtils.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderStateTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAGL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yCAAyC,EAAE,MAAM,gCAAgC,CAAC;AAE3F,MAAM,CA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AAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,uCAAuC,CACtF,qCAAqC,CACtC,CACF,CAAC;QAEJ,MAAM,UAAU,CACd,iBAAiB,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAC9D,CAAC;KACH;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderTypeaheadHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderTypeaheadHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAIvB,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0EAA0E,CAAC;AAKjI,OAAO,EACL,iCAAiC,EAElC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilderTypeaheadHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderTypeaheadHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAIvB,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0EAA0E,CAAC;AAKjI,OAAO,EACL,iCAAiC,EAElC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAsDhE,eAAO,MAAM,2BAA2B,sBACnB,iBAAiB,sBAChB,0BAA0B,SACvC,kBAAkB,GAAG,SAAS,KACpC,SAaF,CAAC;AAEF,eAAO,MAAM,mCAAmC,sBAC3B,iBAAiB,eAEhC,iCAAiC,GACjC,gCAAgC,SAC7B,kBAAkB,GAAG,SAAS,KACpC,SAIF,CAAC;AAEF,eAAO,MAAM,qBAAqB,WAAY,eAAe,KAAG,MAAM,EAgBrE,CAAC;AAEF,eAAO,MAAM,gBAAgB,QACtB,kBAAkB,GAAG,SAAS,KAClC,OAaF,CAAC"}
|
@@ -18,36 +18,38 @@ import { guaranteeType, isNonNullable, isString } from '@finos/legend-shared';
|
|
18
18
|
import { QueryBuilderPostFilterOperator_StartWith } from './fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js';
|
19
19
|
import { PostFilterConditionState, QueryBuilderPostFilterTreeConditionNodeData, } from './fetch-structure/projection/post-filter/QueryBuilderPostFilterState.js';
|
20
20
|
import { QueryBuilderProjectionColumnState, QueryBuilderSimpleProjectionColumnState, } from './fetch-structure/projection/QueryBuilderProjectionColumnState.js';
|
21
|
+
import { QueryBuilderProjectionState } from './fetch-structure/projection/QueryBuilderProjectionState.js';
|
21
22
|
const TYPEAHEAD_TAKE_LIMIT = 10;
|
22
23
|
const START_LENGTH = 3;
|
23
24
|
const createAndSetupQueryBuilderStateForTypeahead = (queryBuilderState) => {
|
24
25
|
const builderState = queryBuilderState.cloneQueryBuilderState();
|
25
26
|
builderState.querySetupState = queryBuilderState.querySetupState;
|
26
|
-
builderState.fetchStructureState.
|
27
|
-
|
28
|
-
|
29
|
-
TYPEAHEAD_TAKE_LIMIT;
|
27
|
+
const projectionState = guaranteeType(builderState.fetchStructureState.implementation, QueryBuilderProjectionState);
|
28
|
+
projectionState.resultSetModifierState.distinct = true;
|
29
|
+
projectionState.resultSetModifierState.limit = TYPEAHEAD_TAKE_LIMIT;
|
30
30
|
return builderState;
|
31
31
|
};
|
32
32
|
const buildColumnTypeaheadQuery = (builderState, columnState, value) => {
|
33
|
-
|
33
|
+
const projectionState = guaranteeType(builderState.fetchStructureState.implementation, QueryBuilderProjectionState);
|
34
|
+
let projectionColumnState;
|
34
35
|
if (columnState instanceof QueryBuilderProjectionColumnState) {
|
35
|
-
|
36
|
+
projectionColumnState = columnState;
|
36
37
|
}
|
37
38
|
else {
|
38
|
-
|
39
|
-
const aggregationState =
|
39
|
+
projectionColumnState = columnState.projectionColumnState;
|
40
|
+
const aggregationState = projectionState.aggregationState;
|
40
41
|
aggregationState.columns = [columnState];
|
41
42
|
}
|
42
|
-
|
43
|
-
const postConditionState = new PostFilterConditionState(
|
43
|
+
projectionState.columns = [projectionColumnState];
|
44
|
+
const postConditionState = new PostFilterConditionState(projectionState.postFilterState, columnState, value, new QueryBuilderPostFilterOperator_StartWith());
|
44
45
|
const postFilterNode = new QueryBuilderPostFilterTreeConditionNodeData(undefined, postConditionState);
|
45
|
-
|
46
|
+
projectionState.postFilterState.addNodeFromNode(postFilterNode, undefined);
|
46
47
|
return builderState.resultState.buildExecutionRawLambda();
|
47
48
|
};
|
48
49
|
export const buildPropertyTypeaheadQuery = (queryBuilderState, propertyExpression, value) => {
|
49
50
|
const builderState = createAndSetupQueryBuilderStateForTypeahead(queryBuilderState);
|
50
|
-
const
|
51
|
+
const projectionState = guaranteeType(builderState.fetchStructureState.implementation, QueryBuilderProjectionState);
|
52
|
+
const columnState = new QueryBuilderSimpleProjectionColumnState(projectionState, propertyExpression, false);
|
51
53
|
return buildColumnTypeaheadQuery(builderState, columnState, value);
|
52
54
|
};
|
53
55
|
export const buildProjectionColumnTypeaheadQuery = (queryBuilderState, columnState, value) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderTypeaheadHelper.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderTypeaheadHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,sBAAsB,EACtB,cAAc,EACd,kBAAkB,GAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,wCAAwC,E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AACf,CAAC,CAAC"}
|
@@ -13,16 +13,8 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import {
|
16
|
+
import { LambdaFunction } from '@finos/legend-graph';
|
17
17
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
18
|
-
|
19
|
-
export declare const
|
20
|
-
export declare const buildLambdaFunction: (queryBuilderState: QueryBuilderState, options?: {
|
21
|
-
/**
|
22
|
-
* Set queryBuilderState to `true` when we construct query for execution within the app.
|
23
|
-
* queryBuilderState will make the lambda function building process overrides several query values, such as the row limit.
|
24
|
-
*/
|
25
|
-
isBuildingExecutionQuery?: boolean | undefined;
|
26
|
-
keepSourceInformation?: boolean | undefined;
|
27
|
-
}) => LambdaFunction;
|
18
|
+
import type { LambdaFunctionBuilderOption } from './QueryBuilderValueSpecificationBuilderHelper.js';
|
19
|
+
export declare const buildLambdaFunction: (queryBuilderState: QueryBuilderState, options?: LambdaFunctionBuilderOption) => LambdaFunction;
|
28
20
|
//# sourceMappingURL=QueryBuilderValueSpecificationBuilder.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"QueryBuilderValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAWL,cAAc,EAIf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AA+BpG,eAAO,MAAM,mBAAmB,sBACX,iBAAiB,YAC1B,2BAA2B,KACpC,cA2GF,CAAC"}
|