@finos/legend-query-builder 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts +1 -0
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +11 -2
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +23 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js +104 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +1 -9
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +8 -26
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +60 -12
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +3 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +6 -14
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +1 -0
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +12 -18
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +3 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.js → QueryBuilderOLAPGroupByPanel.js} +2 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +9 -11
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +8 -9
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +12 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +11 -7
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +1 -0
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +1 -15
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +1 -0
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +36 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js +50 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +9 -11
- package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/QueryBuilderConfig.d.ts +1 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +1 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +43 -0
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderConstantsState.js +116 -0
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -0
- package/lib/stores/QueryBuilderParametersState.d.ts +0 -4
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderParametersState.js +0 -1
- package/lib/stores/QueryBuilderParametersState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +3 -10
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +6 -140
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +9 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +19 -4
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +4 -3
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +50 -42
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +23 -25
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +14 -78
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +4 -20
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -4
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +6 -6
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.d.ts → QueryBuilderOLAPGroupByOperatorLoader.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.js → QueryBuilderOLAPGroupByOperatorLoader.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.d.ts → QueryBuilderOLAPGroupByState.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.js → QueryBuilderOLAPGroupByState.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.d.ts → QueryBuilderOLAPGroupByStateBuilder.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.js → QueryBuilderOLAPGroupByStateBuilder.js} +4 -4
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.js → QueryBuilderOLAPGroupByValueSpecificationBuilder.js} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +5 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +10 -10
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +6 -4
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +27 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +93 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +60 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +70 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +199 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +49 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js +24 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.d.ts → milestoning/QueryBuilderMilestoningState.d.ts} +6 -2
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +20 -20
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +55 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +58 -2
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js +7 -4
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/QueryBuilder.tsx +38 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +284 -0
- package/src/components/QueryBuilderDiffPanel.tsx +0 -2
- package/src/components/QueryBuilderParametersPanel.tsx +22 -103
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +119 -36
- package/src/components/QueryBuilderSideBar.tsx +5 -22
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +29 -39
- package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.tsx → QueryBuilderOLAPGroupByPanel.tsx} +1 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +18 -19
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +9 -9
- package/src/components/filter/QueryBuilderFilterPanel.tsx +16 -17
- package/src/components/shared/BasicValueSpecificationEditor.tsx +47 -22
- package/src/components/shared/LambdaEditor.tsx +0 -15
- package/src/components/shared/QueryBuilderVariableSelector.tsx +186 -0
- package/src/components/watermark/QueryBuilderWatermark.tsx +19 -31
- package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
- package/src/stores/QueryBuilderConfig.ts +1 -0
- package/src/stores/QueryBuilderConstantsState.ts +173 -0
- package/src/stores/QueryBuilderParametersState.ts +0 -6
- package/src/stores/QueryBuilderPropertyEditorState.ts +6 -235
- package/src/stores/QueryBuilderState.ts +25 -4
- package/src/stores/QueryBuilderStateBuilder.ts +111 -52
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +34 -51
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +16 -105
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +10 -29
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +2 -2
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.ts → QueryBuilderOLAPGroupByOperatorLoader.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.ts → QueryBuilderOLAPGroupByState.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.ts → QueryBuilderOLAPGroupByStateBuilder.ts} +3 -1
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.ts} +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +11 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +10 -5
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +165 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +96 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +311 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +77 -0
- package/src/stores/{QueryBuilderMilestoningState.ts → milestoning/QueryBuilderMilestoningState.ts} +55 -39
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
- package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +3 -0
- package/src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts +11 -5
- package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -1
- package/tsconfig.json +14 -6
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.js.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.js.map +0 -1
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import type { QueryBuilderState } from './QueryBuilderState.js';
|
17
|
-
import { type EnumValueInstanceValue, type FunctionExpression, type GraphFetchTreeInstanceValue, type ValueSpecificationVisitor, type InstanceValue, type INTERNAL__UnknownValueSpecification, type LambdaFunction, type CollectionInstanceValue, type LambdaFunctionInstanceValue,
|
17
|
+
import { type EnumValueInstanceValue, type FunctionExpression, type GraphFetchTreeInstanceValue, type ValueSpecificationVisitor, type InstanceValue, type INTERNAL__UnknownValueSpecification, type LambdaFunction, type CollectionInstanceValue, type LambdaFunctionInstanceValue, PrimitiveInstanceValue, SimpleFunctionExpression, type VariableExpression, type AbstractPropertyExpression, type INTERNAL__PropagatedValue, type ValueSpecification } from '@finos/legend-graph';
|
18
18
|
/**
|
19
19
|
* This is the value specification processor (a.k.a state builder) for query builder.
|
20
20
|
*
|
@@ -93,13 +93,14 @@ export declare class QueryBuilderValueSpecificationProcessor implements ValueSpe
|
|
93
93
|
* value specification.
|
94
94
|
*/
|
95
95
|
readonly parentExpression?: SimpleFunctionExpression | undefined;
|
96
|
+
readonly parentLambda: LambdaFunction;
|
96
97
|
private constructor();
|
97
|
-
static process(valueSpecification: ValueSpecification, queryBuilderState: QueryBuilderState): void;
|
98
|
+
static process(valueSpecification: ValueSpecification, parentLambda: LambdaFunction, queryBuilderState: QueryBuilderState): void;
|
98
99
|
/**
|
99
100
|
* Process value specification with information about parent function expression
|
100
101
|
* in order to be used in some validation/assertion
|
101
102
|
*/
|
102
|
-
static processChild(valueSpecification: ValueSpecification, parentExpression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState): void;
|
103
|
+
static processChild(valueSpecification: ValueSpecification, parentExpression: SimpleFunctionExpression, parentLambda: LambdaFunction, queryBuilderState: QueryBuilderState): void;
|
103
104
|
visit_INTERNAL__UnknownValueSpecification(valueSpecification: INTERNAL__UnknownValueSpecification): void;
|
104
105
|
visit_INTERNAL__PropagatedValue(valueSpecification: INTERNAL__PropagatedValue): void;
|
105
106
|
visit_FunctionExpression(valueSpecification: FunctionExpression): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderStateBuilder.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"QueryBuilderStateBuilder.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA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;IAItE,gCAAgC,CAC9B,kBAAkB,EAAE,0BAA0B,GAC7C,IAAI;IAyBP,mBAAmB,CAAC,kBAAkB,EAAE,aAAa,GAAG,IAAI;IAI5D,6BAA6B,CAC3B,kBAAkB,EAAE,uBAAuB,GAC1C,IAAI;IAIP,4BAA4B,CAC1B,kBAAkB,EAAE,sBAAsB,GACzC,IAAI;IAIP,4BAA4B,CAC1B,kBAAkB,EAAE,sBAAsB,GACzC,IAAI;IAIP,iCAAiC,CAC/B,kBAAkB,EAAE,2BAA2B,GAC9C,IAAI;IAcP,iCAAiC,CAC/B,kBAAkB,EAAE,2BAA2B,GAC9C,IAAI;CAGR;AAED,eAAO,MAAM,iBAAiB,eAChB,kBAAkB,EAAE,qBACb,iBAAiB,KACnC,IAWF,CAAC;AAEF,eAAO,MAAM,0BAA0B,mBACrB,cAAc,qBACX,iBAAiB,KACnC,IAcF,CAAC"}
|
@@ -13,8 +13,8 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { assertNonNullable, assertTrue, assertType, guaranteeType, UnsupportedOperationError, } from '@finos/legend-shared';
|
17
|
-
import {
|
16
|
+
import { assertNonNullable, assertTrue, assertType, guaranteeIsString, guaranteeNonNullable, guaranteeType, UnsupportedOperationError, } from '@finos/legend-shared';
|
17
|
+
import { matchFunctionName, Class, PrimitiveInstanceValue, SimpleFunctionExpression, getMilestoneTemporalStereotype, SUPPORTED_FUNCTIONS, } from '@finos/legend-graph';
|
18
18
|
import { processTDSPostFilterExpression } from './fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js';
|
19
19
|
import { processFilterExpression } from './filter/QueryBuilderFilterStateBuilder.js';
|
20
20
|
import { processTDSAggregateExpression, processTDSGroupByExpression, } from './fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js';
|
@@ -22,37 +22,39 @@ import { processGraphFetchExpression, processGraphFetchSerializeExpression, } fr
|
|
22
22
|
import { processTDSDistinctExpression, processTDSProjectExpression, processTDSProjectionColumnPropertyExpression, processTDSProjectionDerivationExpression, processTDSSortDirectionExpression, processTDSSortExpression, processTDSTakeExpression, } from './fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js';
|
23
23
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
24
24
|
import { LambdaParameterState } from './shared/LambdaParameterState.js';
|
25
|
-
import { processTDS_OLAPGroupByExpression } from './fetch-structure/tds/olapGroupBy/
|
25
|
+
import { processTDS_OLAPGroupByExpression } from './fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js';
|
26
26
|
import { processWatermarkExpression } from './watermark/QueryBuilderWatermarkStateBuilder.js';
|
27
|
+
import { QueryBuilderConstantExpressionState } from './QueryBuilderConstantsState.js';
|
27
28
|
const processGetAllExpression = (expression, queryBuilderState) => {
|
28
29
|
const _class = expression.genericType?.value.rawType;
|
29
30
|
assertType(_class, Class, `Can't process getAll() expression: getAll() return type is missing`);
|
30
31
|
queryBuilderState.setClass(_class);
|
31
|
-
queryBuilderState.milestoningState.
|
32
|
+
queryBuilderState.milestoningState.clearMilestoningDates();
|
32
33
|
queryBuilderState.explorerState.refreshTreeData();
|
33
34
|
// check parameters (milestoning) and build state
|
34
|
-
|
35
|
+
const acceptedNoOfParameters = 1;
|
35
36
|
const stereotype = getMilestoneTemporalStereotype(_class, queryBuilderState.graphManagerState.graph);
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
queryBuilderState.milestoningState.setProcessingDate(expression.parametersValues[1]);
|
41
|
-
queryBuilderState.milestoningState.setBusinessDate(expression.parametersValues[2]);
|
42
|
-
break;
|
43
|
-
case MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL:
|
44
|
-
acceptedNoOfParameters = 2;
|
45
|
-
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`);
|
46
|
-
queryBuilderState.milestoningState.setBusinessDate(expression.parametersValues[1]);
|
47
|
-
break;
|
48
|
-
case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL:
|
49
|
-
acceptedNoOfParameters = 2;
|
50
|
-
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`);
|
51
|
-
queryBuilderState.milestoningState.setProcessingDate(expression.parametersValues[1]);
|
52
|
-
break;
|
53
|
-
default:
|
54
|
-
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: getAll() expects no arguments`);
|
37
|
+
if (stereotype) {
|
38
|
+
queryBuilderState.milestoningState
|
39
|
+
.getMilestoningImplementation(stereotype)
|
40
|
+
.processGetAllParamaters(expression.parametersValues);
|
55
41
|
}
|
42
|
+
else {
|
43
|
+
assertTrue(expression.parametersValues.length === acceptedNoOfParameters, `Can't process getAll() expression: getAll() expects no arguments`);
|
44
|
+
}
|
45
|
+
};
|
46
|
+
const processLetExpression = (expression, queryBuilderState, parentLambda) => {
|
47
|
+
const parameters = expression.parametersValues;
|
48
|
+
assertTrue(expression.parametersValues.length === 2, 'Let function expected to have two parameters (left and right side value)');
|
49
|
+
// process left side (var)
|
50
|
+
const letVariable = guaranteeIsString(guaranteeType(parameters[0], PrimitiveInstanceValue, 'Can`t process let function: left side should be a primitive instance value').values[0], 'Can`t process let function: left side should be a string primitive instance value');
|
51
|
+
const varExp = guaranteeNonNullable(parentLambda.openVariables.get(letVariable), `Unable to find variable ${letVariable} in lambda function`);
|
52
|
+
// process right side (value)
|
53
|
+
const rightSide = guaranteeNonNullable(parameters[1]);
|
54
|
+
// final
|
55
|
+
const constantExpression = new QueryBuilderConstantExpressionState(queryBuilderState, varExp, rightSide);
|
56
|
+
queryBuilderState.constantState.setShowConstantPanel(true);
|
57
|
+
queryBuilderState.constantState.addConstant(constantExpression);
|
56
58
|
};
|
57
59
|
/**
|
58
60
|
* This is the value specification processor (a.k.a state builder) for query builder.
|
@@ -132,19 +134,21 @@ export class QueryBuilderValueSpecificationProcessor {
|
|
132
134
|
* value specification.
|
133
135
|
*/
|
134
136
|
parentExpression;
|
135
|
-
|
137
|
+
parentLambda;
|
138
|
+
constructor(queryBuilderState, parentLambda, parentExpression) {
|
136
139
|
this.queryBuilderState = queryBuilderState;
|
137
140
|
this.parentExpression = parentExpression;
|
141
|
+
this.parentLambda = parentLambda;
|
138
142
|
}
|
139
|
-
static process(valueSpecification, queryBuilderState) {
|
140
|
-
valueSpecification.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(queryBuilderState, undefined));
|
143
|
+
static process(valueSpecification, parentLambda, queryBuilderState) {
|
144
|
+
valueSpecification.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(queryBuilderState, parentLambda, undefined));
|
141
145
|
}
|
142
146
|
/**
|
143
147
|
* Process value specification with information about parent function expression
|
144
148
|
* in order to be used in some validation/assertion
|
145
149
|
*/
|
146
|
-
static processChild(valueSpecification, parentExpression, queryBuilderState) {
|
147
|
-
valueSpecification.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(queryBuilderState, parentExpression));
|
150
|
+
static processChild(valueSpecification, parentExpression, parentLambda, queryBuilderState) {
|
151
|
+
valueSpecification.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(queryBuilderState, parentLambda, parentExpression));
|
148
152
|
}
|
149
153
|
visit_INTERNAL__UnknownValueSpecification(valueSpecification) {
|
150
154
|
assertNonNullable(this.parentExpression, `Can't process unknown value: parent expression cannot be retrieved`);
|
@@ -182,7 +186,7 @@ export class QueryBuilderValueSpecificationProcessor {
|
|
182
186
|
assertTrue(valueSpecification.parametersValues.length === 2, `Can't process filter() expression: filter() expects 1 argument`);
|
183
187
|
// check preceding expression
|
184
188
|
const precedingExpression = guaranteeType(valueSpecification.parametersValues[0], SimpleFunctionExpression, `Can't process filter() expression: only support filter() immediately following an expression`);
|
185
|
-
QueryBuilderValueSpecificationProcessor.process(precedingExpression, this.queryBuilderState);
|
189
|
+
QueryBuilderValueSpecificationProcessor.process(precedingExpression, this.parentLambda, this.queryBuilderState);
|
186
190
|
if (matchFunctionName(precedingExpression.functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL)) {
|
187
191
|
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}')`);
|
188
192
|
processFilterExpression(valueSpecification, this.queryBuilderState);
|
@@ -208,23 +212,23 @@ export class QueryBuilderValueSpecificationProcessor {
|
|
208
212
|
}
|
209
213
|
}
|
210
214
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.WATERMARK)) {
|
211
|
-
processWatermarkExpression(valueSpecification, this.queryBuilderState);
|
215
|
+
processWatermarkExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
212
216
|
return;
|
213
217
|
}
|
214
218
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT)) {
|
215
|
-
processTDSProjectExpression(valueSpecification, this.queryBuilderState);
|
219
|
+
processTDSProjectExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
216
220
|
return;
|
217
221
|
}
|
218
222
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_TAKE)) {
|
219
|
-
processTDSTakeExpression(valueSpecification, this.queryBuilderState);
|
223
|
+
processTDSTakeExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
220
224
|
return;
|
221
225
|
}
|
222
226
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DISTINCT)) {
|
223
|
-
processTDSDistinctExpression(valueSpecification, this.queryBuilderState);
|
227
|
+
processTDSDistinctExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
224
228
|
return;
|
225
229
|
}
|
226
230
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_SORT)) {
|
227
|
-
processTDSSortExpression(valueSpecification, this.queryBuilderState);
|
231
|
+
processTDSSortExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
228
232
|
return;
|
229
233
|
}
|
230
234
|
else if (matchFunctionName(functionName, [
|
@@ -235,26 +239,30 @@ export class QueryBuilderValueSpecificationProcessor {
|
|
235
239
|
return;
|
236
240
|
}
|
237
241
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY)) {
|
238
|
-
processTDSGroupByExpression(valueSpecification, this.queryBuilderState);
|
242
|
+
processTDSGroupByExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
239
243
|
return;
|
240
244
|
}
|
241
245
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG)) {
|
242
|
-
processTDSAggregateExpression(valueSpecification, this.parentExpression, this.queryBuilderState);
|
246
|
+
processTDSAggregateExpression(valueSpecification, this.parentExpression, this.queryBuilderState, this.parentLambda);
|
243
247
|
return;
|
244
248
|
}
|
245
249
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_GROUPBY)) {
|
246
|
-
processTDS_OLAPGroupByExpression(valueSpecification, this.queryBuilderState);
|
250
|
+
processTDS_OLAPGroupByExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
247
251
|
return;
|
248
252
|
}
|
249
253
|
else if (matchFunctionName(functionName, QUERY_BUILDER_SUPPORTED_FUNCTIONS.SERIALIZE)) {
|
250
|
-
processGraphFetchSerializeExpression(valueSpecification, this.queryBuilderState);
|
254
|
+
processGraphFetchSerializeExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
251
255
|
return;
|
252
256
|
}
|
253
257
|
else if (matchFunctionName(functionName, [
|
254
258
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GRAPH_FETCH_CHECKED,
|
255
259
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GRAPH_FETCH,
|
256
260
|
])) {
|
257
|
-
processGraphFetchExpression(valueSpecification, this.queryBuilderState);
|
261
|
+
processGraphFetchExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
262
|
+
return;
|
263
|
+
}
|
264
|
+
else if (matchFunctionName(functionName, [SUPPORTED_FUNCTIONS.LET])) {
|
265
|
+
processLetExpression(valueSpecification, this.queryBuilderState, this.parentLambda);
|
258
266
|
return;
|
259
267
|
}
|
260
268
|
throw new UnsupportedOperationError(`Can't process expression of function ${functionName}()`);
|
@@ -287,7 +295,7 @@ export class QueryBuilderValueSpecificationProcessor {
|
|
287
295
|
throw new UnsupportedOperationError();
|
288
296
|
}
|
289
297
|
visit_LambdaFunctionInstanceValue(valueSpecification) {
|
290
|
-
valueSpecification.values.forEach((value) => value.expressionSequence.forEach((expression) => expression.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(this.queryBuilderState, this.parentExpression))));
|
298
|
+
valueSpecification.values.forEach((value) => value.expressionSequence.forEach((expression) => expression.accept_ValueSpecificationVisitor(new QueryBuilderValueSpecificationProcessor(this.queryBuilderState, this.parentLambda, this.parentExpression))));
|
291
299
|
}
|
292
300
|
visit_GraphFetchTreeInstanceValue(valueSpecification) {
|
293
301
|
throw new UnsupportedOperationError();
|
@@ -305,6 +313,6 @@ export const processQueryLambdaFunction = (lambdaFunction, queryBuilderState) =>
|
|
305
313
|
if (lambdaFunction.functionType.parameters.length) {
|
306
314
|
processParameters(lambdaFunction.functionType.parameters, queryBuilderState);
|
307
315
|
}
|
308
|
-
lambdaFunction.expressionSequence.map((expression) => QueryBuilderValueSpecificationProcessor.process(expression, queryBuilderState));
|
316
|
+
lambdaFunction.expressionSequence.map((expression) => QueryBuilderValueSpecificationProcessor.process(expression, lambdaFunction, queryBuilderState));
|
309
317
|
};
|
310
318
|
//# sourceMappingURL=QueryBuilderStateBuilder.js.map
|
@@ -1 +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,EAQL,
|
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,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAQL,iBAAiB,EACjB,KAAK,EAGL,sBAAsB,EACtB,wBAAwB,EAGxB,8BAA8B,EAG9B,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,yEAAyE,CAAC;AACzH,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,0EAA0E,CAAC;AAClF,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,GACrC,MAAM,yEAAyE,CAAC;AACjF,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,4CAA4C,EAC5C,wCAAwC,EACxC,iCAAiC,EACjC,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,0EAA0E,CAAC;AAC5H,OAAO,EA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AAI,oBAAoB,CAC7C,SAAS,EACT,iBAAiB,CAAC,iBAAiB,EACnC,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAC1C,CAAC;QACF,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACpC,mBAAmB,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,cAA8B,EAC9B,iBAAoC,EAC9B,EAAE;IACR,IAAI,cAAc,CAAC,YAAY,CAAC,UAAU,CAAC,MAAM,EAAE;QACjD,iBAAiB,CACf,cAAc,CAAC,YAAY,CAAC,UAAU,EACtC,iBAAiB,CAClB,CAAC;KACH;IACD,cAAc,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CACnD,uCAAuC,CAAC,OAAO,CAC7C,UAAU,EACV,cAAc,EACd,iBAAiB,CAClB,CACF,CAAC;AACJ,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAWL,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAWL,cAAc,EAKf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAkDpG,eAAO,MAAM,mBAAmB,sBACX,iBAAiB,YAC1B,2BAA2B,KACpC,cAmEF,CAAC"}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
17
|
-
import { Multiplicity, getMilestoneTemporalStereotype, extractElementNameFromPath, InstanceValue, PackageableElementExplicitReference, CORE_PURE_PATH, FunctionType, GenericType, GenericTypeExplicitReference, LambdaFunction, SimpleFunctionExpression,
|
17
|
+
import { Multiplicity, getMilestoneTemporalStereotype, extractElementNameFromPath, InstanceValue, PackageableElementExplicitReference, CORE_PURE_PATH, FunctionType, GenericType, GenericTypeExplicitReference, LambdaFunction, SimpleFunctionExpression, PrimitiveInstanceValue, PrimitiveType, SUPPORTED_FUNCTIONS, } from '@finos/legend-graph';
|
18
18
|
import { buildFilterExpression } from './filter/QueryBuilderFilterValueSpecificationBuilder.js';
|
19
19
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
20
20
|
import { buildWatermarkExpression } from './watermark/QueryBuilderWatermarkValueSpecificationBuilder.js';
|
@@ -26,6 +26,15 @@ const buildGetAllFunction = (_class, multiplicity) => {
|
|
26
26
|
_func.parametersValues.push(classInstance);
|
27
27
|
return _func;
|
28
28
|
};
|
29
|
+
const buildLetExpression = (constantExpressionState) => {
|
30
|
+
const varName = constantExpressionState.variable.name;
|
31
|
+
const value = constantExpressionState.value;
|
32
|
+
const leftSide = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(PrimitiveType.STRING)));
|
33
|
+
leftSide.values = [varName];
|
34
|
+
const letFunc = new SimpleFunctionExpression(extractElementNameFromPath(SUPPORTED_FUNCTIONS.LET));
|
35
|
+
letFunc.parametersValues = [leftSide, value];
|
36
|
+
return letFunc;
|
37
|
+
};
|
29
38
|
const buildFetchStructure = (fetchStructureState, lambdaFunction, options) => {
|
30
39
|
fetchStructureState.implementation.appendFetchStructure(lambdaFunction, options);
|
31
40
|
};
|
@@ -37,36 +46,25 @@ export const buildLambdaFunction = (queryBuilderState, options) => {
|
|
37
46
|
// build milestoning parameter(s) for getAll()
|
38
47
|
const milestoningStereotype = getMilestoneTemporalStereotype(_class, queryBuilderState.graphManagerState.graph);
|
39
48
|
if (milestoningStereotype) {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
break;
|
44
|
-
}
|
45
|
-
case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL: {
|
46
|
-
getAllFunction.parametersValues.push(guaranteeNonNullable(queryBuilderState.milestoningState.processingDate, `Milestoning class should have a parameter of type 'Date'`));
|
47
|
-
break;
|
48
|
-
}
|
49
|
-
case MILESTONING_STEREOTYPE.BITEMPORAL: {
|
50
|
-
getAllFunction.parametersValues.push(guaranteeNonNullable(queryBuilderState.milestoningState.processingDate, `Milestoning class should have a parameter of type 'Date'`));
|
51
|
-
getAllFunction.parametersValues.push(guaranteeNonNullable(queryBuilderState.milestoningState.businessDate, `Milestoning class should have a parameter of type 'Date'`));
|
52
|
-
break;
|
53
|
-
}
|
54
|
-
default:
|
55
|
-
}
|
49
|
+
queryBuilderState.milestoningState
|
50
|
+
.getMilestoningImplementation(milestoningStereotype)
|
51
|
+
.buildGetAllParameters(getAllFunction);
|
56
52
|
}
|
57
53
|
lambdaFunction.expressionSequence[0] = getAllFunction;
|
58
54
|
// build watermark
|
59
|
-
|
60
|
-
if (watermarkFunction) {
|
61
|
-
lambdaFunction.expressionSequence[0] = watermarkFunction;
|
62
|
-
}
|
55
|
+
buildWatermarkExpression(queryBuilderState.watermarkState, lambdaFunction);
|
63
56
|
// build filter
|
64
|
-
|
65
|
-
if (filterFunction) {
|
66
|
-
lambdaFunction.expressionSequence[0] = filterFunction;
|
67
|
-
}
|
57
|
+
buildFilterExpression(queryBuilderState.filterState, lambdaFunction);
|
68
58
|
// build fetch-structure
|
69
59
|
buildFetchStructure(queryBuilderState.fetchStructureState, lambdaFunction, options);
|
60
|
+
// build variable expressions
|
61
|
+
if (queryBuilderState.constantState.constants.length) {
|
62
|
+
const letExpressions = queryBuilderState.constantState.constants.map(buildLetExpression);
|
63
|
+
lambdaFunction.expressionSequence = [
|
64
|
+
...letExpressions,
|
65
|
+
...lambdaFunction.expressionSequence,
|
66
|
+
];
|
67
|
+
}
|
70
68
|
// build parameters
|
71
69
|
if (queryBuilderState.parametersState.parameterStates.length) {
|
72
70
|
if (options?.isBuildingExecutionQuery) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderValueSpecificationBuilder.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAEL,YAAY,EACZ,8BAA8B,EAC9B,0BAA0B,EAC1B,aAAa,EACb,mCAAmC,EACnC,cAAc,EACd,YAAY,EACZ,WAAW,EACX,4BAA4B,EAC5B,cAAc,EACd,wBAAwB,EACxB,sBAAsB,
|
1
|
+
{"version":3,"file":"QueryBuilderValueSpecificationBuilder.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAEL,YAAY,EACZ,8BAA8B,EAC9B,0BAA0B,EAC1B,aAAa,EACb,mCAAmC,EACnC,cAAc,EACd,YAAY,EACZ,WAAW,EACX,4BAA4B,EAC5B,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAGhG,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,wBAAwB,EAAE,MAAM,+DAA+D,CAAC;AACzG,OAAO,EAAE,qCAAqC,EAAE,MAAM,kCAAkC,CAAC;AAGzF,MAAM,mB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AAc;YACjB,GAAG,cAAc,CAAC,kBAAkB;SACrC,CAAC;KACH;IACD,mBAAmB;IACnB,IAAI,iBAAiB,CAAC,eAAe,CAAC,eAAe,CAAC,MAAM,EAAE;QAC5D,IAAI,OAAO,EAAE,wBAAwB,EAAE;YACrC,qCAAqC,CACnC,cAAc,EACd,iBAAiB,CAAC,eAAe,CAAC,eAAe,EACjD,iBAAiB,CAAC,iBAAiB,CACpC,CAAC;SACH;aAAM;YACL,cAAc,CAAC,YAAY,CAAC,UAAU;gBACpC,iBAAiB,CAAC,eAAe,CAAC,eAAe,CAAC,GAAG,CACnD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnB,CAAC;SACL;KACF;IACD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderValueSpecificationBuilderHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,
|
1
|
+
{"version":3,"file":"QueryBuilderValueSpecificationBuilderHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAM1B,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAiBhE,eAAO,MAAM,4BAA4B,uBACnB,0BAA0B,qBAC3B,iBAAiB,uBACf,MAAM,sCAOS,OAAO,KAC1C,kBAqFF,CAAC;AAEF,oBAAY,2BAA2B,GAAG;IACxC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C,CAAC"}
|
@@ -13,82 +13,18 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { AbstractPropertyExpression,
|
16
|
+
import { AbstractPropertyExpression, DerivedProperty, INTERNAL__PropagatedValue, matchFunctionName, SimpleFunctionExpression, VariableExpression, } from '@finos/legend-graph';
|
17
17
|
import { getNullableFirstElement, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
|
18
18
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
19
|
-
import {
|
19
|
+
import { variableExpression_setName } from './shared/ValueSpecificationModifierHelper.js';
|
20
20
|
/**
|
21
|
-
*
|
22
|
-
* date propagation so we know whether we need to fill in values for the parameter
|
23
|
-
* or just propgate values from the parent's expression
|
24
|
-
*
|
25
|
-
* NOTE: this takes date propgation into account. See the table below for all
|
26
|
-
* the combination:
|
27
|
-
*
|
28
|
-
* | [source] | | | | |
|
29
|
-
* ----------------------------------------------------------------------
|
30
|
-
* [target] | | NONE | PR_TMP | BI_TMP | BU_TMP |
|
31
|
-
* ----------------------------------------------------------------------
|
32
|
-
* | NONE | N.A. | PRD | PRD,BUD | BUD |
|
33
|
-
* ----------------------------------------------------------------------
|
34
|
-
* | PR_TMP | N.A. | X | PRD,BUD | BUD |
|
35
|
-
* ----------------------------------------------------------------------
|
36
|
-
* | BI_TMP | N.A. | X | X | X |
|
37
|
-
* ----------------------------------------------------------------------
|
38
|
-
* | BU_TMP | N.A. | PRD | PRD,BUD | X |
|
39
|
-
* ----------------------------------------------------------------------
|
40
|
-
*
|
41
|
-
* Annotations:
|
42
|
-
*
|
43
|
-
* [source]: source temporal type
|
44
|
-
* [target]: target temporal type
|
45
|
-
*
|
46
|
-
* PR_TMP : processing temporal
|
47
|
-
* BI_TMP : bitemporal
|
48
|
-
* BU_TMP : business temporal
|
49
|
-
*
|
50
|
-
* X : no default date propagated
|
51
|
-
* PRD : default processing date is propagated
|
52
|
-
* BUD : default business date is propgated
|
21
|
+
* Gets the value of ValueSpecification given INTERNAL__PropagatedValue is pointing to.
|
53
22
|
*/
|
54
|
-
const
|
55
|
-
|
56
|
-
|
57
|
-
// Default date propagation is not supported for current expression when the previous property expression is a derived property.
|
58
|
-
if (prevPropertyExpression &&
|
59
|
-
prevPropertyExpression.func.value instanceof DerivedProperty &&
|
60
|
-
prevPropertyExpression.func.value._OWNER.derivedProperties.includes(prevPropertyExpression.func.value)) {
|
61
|
-
return false;
|
62
|
-
}
|
63
|
-
// Default date propagation is not supported for current expression when the milestonedParameterValues of
|
64
|
-
// the previous property expression doesn't match with the global milestonedParameterValues
|
65
|
-
if (prevPropertyExpression &&
|
66
|
-
prevPropertyExpression.func.value.genericType.value.rawType instanceof Class) {
|
67
|
-
const milestoningStereotype = getMilestoneTemporalStereotype(prevPropertyExpression.func.value.genericType.value.rawType, graph);
|
68
|
-
if (milestoningStereotype &&
|
69
|
-
!prevPropertyExpression.parametersValues
|
70
|
-
.slice(1)
|
71
|
-
.every((parameterValue) => parameterValue instanceof INTERNAL__PropagatedValue)) {
|
72
|
-
return false;
|
73
|
-
}
|
74
|
-
}
|
75
|
-
if (property.genericType.value.rawType instanceof Class) {
|
76
|
-
// the stereotype of source class of current property expression.
|
77
|
-
const sourceStereotype = property instanceof DerivedProperty
|
78
|
-
? getDerivedPropertyMilestoningSteoreotype(property, graph)
|
79
|
-
: undefined;
|
80
|
-
// Default date propagation is always supported if the source is `bitemporal`
|
81
|
-
if (sourceStereotype === MILESTONING_STEREOTYPE.BITEMPORAL) {
|
82
|
-
return true;
|
83
|
-
}
|
84
|
-
// the stereotype (if exists) of the generic type of current property expression.
|
85
|
-
const targetStereotype = getMilestoneTemporalStereotype(property.genericType.value.rawType, graph);
|
86
|
-
// Default date propagation is supported when stereotype of both source and target matches
|
87
|
-
if (sourceStereotype && targetStereotype) {
|
88
|
-
return sourceStereotype === targetStereotype;
|
89
|
-
}
|
23
|
+
const getValueOfInternalPropagatedValue = (valueSpec) => {
|
24
|
+
if (valueSpec.getValue() instanceof INTERNAL__PropagatedValue) {
|
25
|
+
return getValueOfInternalPropagatedValue(guaranteeType(valueSpec.getValue(), INTERNAL__PropagatedValue));
|
90
26
|
}
|
91
|
-
return
|
27
|
+
return valueSpec.getValue();
|
92
28
|
};
|
93
29
|
export const buildPropertyExpressionChain = (propertyExpression, queryBuilderState, lambdaParameterName,
|
94
30
|
/**
|
@@ -122,9 +58,7 @@ TEMPORARY__disableDatePropagation) => {
|
|
122
58
|
if (parameterValue instanceof INTERNAL__PropagatedValue) {
|
123
59
|
// Replace with argumentless derived property expression only when default date propagation is supported
|
124
60
|
if (!TEMPORARY__disableDatePropagation &&
|
125
|
-
|
126
|
-
? nextExpression
|
127
|
-
: undefined)) {
|
61
|
+
parameterValue.isPropagatedValue) {
|
128
62
|
// NOTE: For `bitemporal` property check if the property expression has parameters which are not instance of
|
129
63
|
// `INTERNAL_PropagatedValue` then pass the parameters as user explicitly changed values of either of the parameters.
|
130
64
|
if ((index === 1 &&
|
@@ -132,9 +66,11 @@ TEMPORARY__disableDatePropagation) => {
|
|
132
66
|
(index === 0 &&
|
133
67
|
currentPropertyExpression.parametersValues.length === 3 &&
|
134
68
|
!(currentPropertyExpression.parametersValues[2] instanceof
|
135
|
-
INTERNAL__PropagatedValue
|
69
|
+
INTERNAL__PropagatedValue &&
|
70
|
+
currentPropertyExpression.parametersValues[2]
|
71
|
+
.isPropagatedValue === true))) {
|
136
72
|
currentPropertyExpression.parametersValues[index + 1] =
|
137
|
-
parameterValue
|
73
|
+
getValueOfInternalPropagatedValue(parameterValue);
|
138
74
|
}
|
139
75
|
else {
|
140
76
|
currentPropertyExpression.parametersValues = [
|
@@ -145,7 +81,7 @@ TEMPORARY__disableDatePropagation) => {
|
|
145
81
|
}
|
146
82
|
else {
|
147
83
|
currentPropertyExpression.parametersValues[index + 1] =
|
148
|
-
parameterValue
|
84
|
+
getValueOfInternalPropagatedValue(parameterValue);
|
149
85
|
}
|
150
86
|
}
|
151
87
|
});
|
@@ -160,7 +96,7 @@ TEMPORARY__disableDatePropagation) => {
|
|
160
96
|
}
|
161
97
|
// Update the root lambda name based on the parent's lambda parameter name.
|
162
98
|
if (currentExpression instanceof VariableExpression) {
|
163
|
-
currentExpression
|
99
|
+
variableExpression_setName(currentExpression, lambdaParameterName);
|
164
100
|
}
|
165
101
|
return newPropertyExpression;
|
166
102
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderValueSpecificationBuilderHelper.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,
|
1
|
+
{"version":3,"file":"QueryBuilderValueSpecificationBuilderHelper.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,GAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AAEtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAE1F;;GAEG;AACH,MAAM,iCAAiC,GAAG,CACxC,SAAoC,EAChB,EAAE;IACtB,IAAI,SAAS,CAAC,QAAQ,EAAE,YAAY,yBAAyB,EAAE;QAC7D,OAAO,iCAAiC,CACtC,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,yBAAyB,CAAC,CAC/D,CAAC;KACH;IACD,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC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
|
1
|
-
{"version":3,"file":"QueryBuilderValueSpecificationHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,kBAAkB,EAIvB,2BAA2B,EAC3B,cAAc,EAKd,KAAK,IAAI,EAGT,wBAAwB,EAIxB,0BAA0B,
|
1
|
+
{"version":3,"file":"QueryBuilderValueSpecificationHelper.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderValueSpecificationHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,kBAAkB,EAIvB,2BAA2B,EAC3B,cAAc,EAKd,KAAK,IAAI,EAGT,wBAAwB,EAIxB,0BAA0B,EAO1B,uBAAuB,EAGxB,MAAM,qBAAqB,CAAC;AAgB7B,eAAO,MAAM,sCAAsC,uBAC7B,kBAAkB,KACrC,IAAI,GAAG,SAWT,CAAC;AAEF,eAAO,MAAM,mCAAmC,UACvC,SAAS,UACR,kBAAkB,EAAE,KAC3B,IAAI,GAAG,SAsCT,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAClB,wBAAwB,KACnC,wBAAwB,GAAG,SAa7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,eACjB,kBAAkB,KAC7B,kBAMF,CAAC;AAEF,eAAO,MAAM,iCAAiC,eAChC,kBAAkB,GAAG,SAAS,KACzC,OAiBF,CAAC;AAEF,eAAO,MAAM,6BAA6B,SAClC,IAAI,GAAG,SAAS,kBACN,IAAI,KACnB,OA6BF,CAAC;AAEF,eAAO,MAAM,oCAAoC,SACzC,cAAc,KACnB,OAsBF,CAAC;AAEF,eAAO,MAAM,uCAAuC,wBAC7B,MAAM,yBACJ,kBAAkB,EAAE,SACpC,SAAS,KACf,2BAeF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,+BAA+B,uBACtB,0BAA0B,SACvC,SAAS,KACf,IA8BF,CAAC;AAEF,eAAO,MAAM,sCAAsC,UAC1C,kBAAkB,KACxB,MAAM,GAAG,SAKX,CAAC;AAEF,eAAO,MAAM,sCAAsC,UAC1C,kBAAkB,KACxB,MAAM,GAAG,SAKX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,UAAW,SAAS,KAAG,uBAMnD,CAAC"}
|
@@ -13,10 +13,10 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { CORE_PURE_PATH, FunctionType, LambdaFunction, LambdaFunctionInstanceValue, PRIMITIVE_TYPE, VariableExpression, DATE_FORMAT, DATE_TIME_FORMAT, matchFunctionName, PrimitiveInstanceValue, EnumValueInstanceValue, SimpleFunctionExpression, PrimitiveType, extractElementNameFromPath, AbstractPropertyExpression, isSuperType, Class, getMilestoneTemporalStereotype, DerivedProperty,
|
16
|
+
import { CORE_PURE_PATH, FunctionType, LambdaFunction, LambdaFunctionInstanceValue, PRIMITIVE_TYPE, VariableExpression, DATE_FORMAT, DATE_TIME_FORMAT, matchFunctionName, PrimitiveInstanceValue, EnumValueInstanceValue, SimpleFunctionExpression, PrimitiveType, extractElementNameFromPath, AbstractPropertyExpression, isSuperType, Class, getMilestoneTemporalStereotype, DerivedProperty, PackageableElementExplicitReference, Multiplicity, CollectionInstanceValue, GenericTypeExplicitReference, GenericType, } from '@finos/legend-graph';
|
17
17
|
import { addUniqueEntry, formatDate, guaranteeNonNullable, guaranteeType, isNumber, isString, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
19
|
-
import { getDerivedPropertyMilestoningSteoreotype } from './
|
19
|
+
import { getDerivedPropertyMilestoningSteoreotype, validateMilestoningPropertyExpressionChain, } from './milestoning/QueryBuilderMilestoningHelper.js';
|
20
20
|
export const getNonCollectionValueSpecificationType = (valueSpecification) => {
|
21
21
|
if (valueSpecification instanceof PrimitiveInstanceValue) {
|
22
22
|
return valueSpecification.genericType.value.rawType;
|
@@ -133,6 +133,7 @@ export const generateDefaultValueForPrimitiveType = (type) => {
|
|
133
133
|
case PRIMITIVE_TYPE.DECIMAL:
|
134
134
|
case PRIMITIVE_TYPE.FLOAT:
|
135
135
|
case PRIMITIVE_TYPE.INTEGER:
|
136
|
+
case PRIMITIVE_TYPE.BINARY:
|
136
137
|
return 0;
|
137
138
|
case PRIMITIVE_TYPE.DATE:
|
138
139
|
case PRIMITIVE_TYPE.STRICTDATE:
|
@@ -195,24 +196,7 @@ export const validatePropertyExpressionChain = (propertyExpression, graph) => {
|
|
195
196
|
const targetStereotype = getMilestoneTemporalStereotype(propertyExpression.func.value.genericType.value.rawType, graph);
|
196
197
|
if (targetStereotype) {
|
197
198
|
const sourceStereotype = getDerivedPropertyMilestoningSteoreotype(guaranteeType(func, DerivedProperty), graph);
|
198
|
-
|
199
|
-
targetStereotype !== sourceStereotype) {
|
200
|
-
if (targetStereotype === MILESTONING_STEREOTYPE.BITEMPORAL) {
|
201
|
-
if (propertyExpression.parametersValues.length !== 3 &&
|
202
|
-
!sourceStereotype) {
|
203
|
-
throw new UnsupportedOperationError(`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should have exactly two parameters`);
|
204
|
-
}
|
205
|
-
else if (propertyExpression.parametersValues.length < 2) {
|
206
|
-
throw new UnsupportedOperationError(`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should have at least one parameter`);
|
207
|
-
}
|
208
|
-
else if (propertyExpression.parametersValues.length > 3) {
|
209
|
-
throw new UnsupportedOperationError(`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should not have more than two parameters`);
|
210
|
-
}
|
211
|
-
}
|
212
|
-
else if (propertyExpression.parametersValues.length !== 2) {
|
213
|
-
throw new UnsupportedOperationError(`Property of milestoning sterotype '${targetStereotype}' should have exactly one parameter`);
|
214
|
-
}
|
215
|
-
}
|
199
|
+
validateMilestoningPropertyExpressionChain(sourceStereotype, targetStereotype, propertyExpression);
|
216
200
|
}
|
217
201
|
}
|
218
202
|
}
|