@finos/legend-query-builder 0.4.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/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 +105 -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 +10 -27
- 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/CustomDatePicker.d.ts.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +3 -3
- package/lib/components/shared/CustomDatePicker.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 +37 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js +53 -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 +1 -17
- 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 +10 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +27 -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 +2 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +13 -20
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +2 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +2 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +4 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.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 +3 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +15 -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/QueryBuilderPostFilterState.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +9 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- 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/QueryBuilderProjectionColumnState.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +4 -0
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.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/QueryBuilderFilterState.d.ts +2 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +9 -1
- package/lib/stores/filter/QueryBuilderFilterState.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} +7 -2
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +30 -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/QueryBuilderWatermarkState.d.ts +2 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.js +6 -0
- package/lib/stores/watermark/QueryBuilderWatermarkState.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 +291 -0
- package/src/components/QueryBuilderDiffPanel.tsx +0 -2
- package/src/components/QueryBuilderParametersPanel.tsx +29 -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/CustomDatePicker.tsx +3 -2
- package/src/components/shared/LambdaEditor.tsx +0 -15
- package/src/components/shared/QueryBuilderVariableSelector.tsx +193 -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 +36 -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 +23 -29
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +2 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +14 -2
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +21 -4
- 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/QueryBuilderPostFilterState.ts +13 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +12 -0
- 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/QueryBuilderFilterState.ts +13 -0
- 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} +66 -39
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
- package/src/stores/watermark/QueryBuilderWatermarkState.ts +8 -0
- 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
|
@@ -38,12 +38,12 @@ import {
|
|
|
38
38
|
Class,
|
|
39
39
|
getMilestoneTemporalStereotype,
|
|
40
40
|
DerivedProperty,
|
|
41
|
-
MILESTONING_STEREOTYPE,
|
|
42
41
|
PackageableElementExplicitReference,
|
|
43
42
|
Multiplicity,
|
|
44
43
|
CollectionInstanceValue,
|
|
45
44
|
GenericTypeExplicitReference,
|
|
46
45
|
GenericType,
|
|
46
|
+
INTERNAL__PropagatedValue,
|
|
47
47
|
} from '@finos/legend-graph';
|
|
48
48
|
import {
|
|
49
49
|
addUniqueEntry,
|
|
@@ -55,7 +55,10 @@ import {
|
|
|
55
55
|
UnsupportedOperationError,
|
|
56
56
|
} from '@finos/legend-shared';
|
|
57
57
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
|
|
58
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
getDerivedPropertyMilestoningSteoreotype,
|
|
60
|
+
validateMilestoningPropertyExpressionChain,
|
|
61
|
+
} from './milestoning/QueryBuilderMilestoningHelper.js';
|
|
59
62
|
|
|
60
63
|
export const getNonCollectionValueSpecificationType = (
|
|
61
64
|
valueSpecification: ValueSpecification,
|
|
@@ -209,6 +212,7 @@ export const generateDefaultValueForPrimitiveType = (
|
|
|
209
212
|
case PRIMITIVE_TYPE.DECIMAL:
|
|
210
213
|
case PRIMITIVE_TYPE.FLOAT:
|
|
211
214
|
case PRIMITIVE_TYPE.INTEGER:
|
|
215
|
+
case PRIMITIVE_TYPE.BINARY:
|
|
212
216
|
return 0;
|
|
213
217
|
case PRIMITIVE_TYPE.DATE:
|
|
214
218
|
case PRIMITIVE_TYPE.STRICTDATE:
|
|
@@ -301,33 +305,11 @@ export const validatePropertyExpressionChain = (
|
|
|
301
305
|
guaranteeType(func, DerivedProperty),
|
|
302
306
|
graph,
|
|
303
307
|
);
|
|
304
|
-
|
|
305
|
-
sourceStereotype
|
|
306
|
-
targetStereotype
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
propertyExpression.parametersValues.length !== 3 &&
|
|
311
|
-
!sourceStereotype
|
|
312
|
-
) {
|
|
313
|
-
throw new UnsupportedOperationError(
|
|
314
|
-
`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should have exactly two parameters`,
|
|
315
|
-
);
|
|
316
|
-
} else if (propertyExpression.parametersValues.length < 2) {
|
|
317
|
-
throw new UnsupportedOperationError(
|
|
318
|
-
`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should have at least one parameter`,
|
|
319
|
-
);
|
|
320
|
-
} else if (propertyExpression.parametersValues.length > 3) {
|
|
321
|
-
throw new UnsupportedOperationError(
|
|
322
|
-
`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should not have more than two parameters`,
|
|
323
|
-
);
|
|
324
|
-
}
|
|
325
|
-
} else if (propertyExpression.parametersValues.length !== 2) {
|
|
326
|
-
throw new UnsupportedOperationError(
|
|
327
|
-
`Property of milestoning sterotype '${targetStereotype}' should have exactly one parameter`,
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
308
|
+
validateMilestoningPropertyExpressionChain(
|
|
309
|
+
sourceStereotype,
|
|
310
|
+
targetStereotype,
|
|
311
|
+
propertyExpression,
|
|
312
|
+
);
|
|
331
313
|
}
|
|
332
314
|
}
|
|
333
315
|
}
|
|
@@ -361,3 +343,15 @@ export const createNullishValue = (graph: PureModel): CollectionInstanceValue =>
|
|
|
361
343
|
new GenericType(graph.getType(CORE_PURE_PATH.ANY)),
|
|
362
344
|
),
|
|
363
345
|
);
|
|
346
|
+
|
|
347
|
+
export const isValueExpressionReferencesinValue = (
|
|
348
|
+
variable: VariableExpression,
|
|
349
|
+
value: ValueSpecification,
|
|
350
|
+
): boolean => {
|
|
351
|
+
if (value instanceof VariableExpression) {
|
|
352
|
+
return value.name === variable.name;
|
|
353
|
+
} else if (value instanceof INTERNAL__PropagatedValue) {
|
|
354
|
+
return isValueExpressionReferencesinValue(variable, value.getValue());
|
|
355
|
+
}
|
|
356
|
+
return false;
|
|
357
|
+
};
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
Class,
|
|
19
19
|
CompilationError,
|
|
20
20
|
LambdaFunction,
|
|
21
|
+
VariableExpression,
|
|
21
22
|
} from '@finos/legend-graph';
|
|
22
23
|
import type { Hashable } from '@finos/legend-shared';
|
|
23
24
|
import { computed, makeObservable } from 'mobx';
|
|
@@ -61,6 +62,7 @@ export abstract class QueryBuilderFetchStructureImplementationState
|
|
|
61
62
|
abstract fetchProperties(
|
|
62
63
|
nodes: QueryBuilderExplorerTreePropertyNodeData[],
|
|
63
64
|
): void;
|
|
65
|
+
abstract isVariableUsed(variable: VariableExpression): boolean;
|
|
64
66
|
abstract checkBeforeChangingImplementation(onChange: () => void): void;
|
|
65
67
|
abstract appendFetchStructure(
|
|
66
68
|
lambdaFunction: LambdaFunction,
|
|
@@ -18,10 +18,11 @@ import type { QueryBuilderState } from '../../QueryBuilderState.js';
|
|
|
18
18
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
19
19
|
import {
|
|
20
20
|
type CompilationError,
|
|
21
|
-
PackageableElementExplicitReference,
|
|
22
|
-
RootGraphFetchTree,
|
|
23
21
|
type Class,
|
|
24
22
|
type LambdaFunction,
|
|
23
|
+
type VariableExpression,
|
|
24
|
+
PackageableElementExplicitReference,
|
|
25
|
+
RootGraphFetchTree,
|
|
25
26
|
getAllSuperclasses,
|
|
26
27
|
} from '@finos/legend-graph';
|
|
27
28
|
import {
|
|
@@ -51,6 +52,7 @@ import {
|
|
|
51
52
|
type Hashable,
|
|
52
53
|
} from '@finos/legend-shared';
|
|
53
54
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
|
55
|
+
import { isValueExpressionReferencesinValue } from '../../QueryBuilderValueSpecificationHelper.js';
|
|
54
56
|
|
|
55
57
|
export class QueryBuilderGraphFetchTreeState
|
|
56
58
|
extends QueryBuilderFetchStructureImplementationState
|
|
@@ -247,6 +249,16 @@ export class QueryBuilderGraphFetchTreeState
|
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
251
|
|
|
252
|
+
isVariableUsed(variable: VariableExpression): boolean {
|
|
253
|
+
return Boolean(
|
|
254
|
+
Array.from(this.treeData?.nodes.values() ?? []).find((node) =>
|
|
255
|
+
node.tree.parameters.find((p) =>
|
|
256
|
+
isValueExpressionReferencesinValue(variable, p),
|
|
257
|
+
),
|
|
258
|
+
),
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
250
262
|
get hashCode(): string {
|
|
251
263
|
return hashArray([
|
|
252
264
|
QUERY_BUILDER_HASH_STRUCTURE.GRAPH_FETCH_STATE,
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
type LambdaFunction,
|
|
18
19
|
GraphFetchTreeInstanceValue,
|
|
19
20
|
matchFunctionName,
|
|
20
21
|
RootGraphFetchTree,
|
|
@@ -31,6 +32,7 @@ import { buildGraphFetchTreeData } from './QueryBuilderGraphFetchTreeUtil.js';
|
|
|
31
32
|
export const processGraphFetchExpression = (
|
|
32
33
|
expression: SimpleFunctionExpression,
|
|
33
34
|
queryBuilderState: QueryBuilderState,
|
|
35
|
+
parentLambda: LambdaFunction,
|
|
34
36
|
): void => {
|
|
35
37
|
const functionName = expression.functionName;
|
|
36
38
|
|
|
@@ -55,6 +57,7 @@ export const processGraphFetchExpression = (
|
|
|
55
57
|
);
|
|
56
58
|
QueryBuilderValueSpecificationProcessor.process(
|
|
57
59
|
precedingExpression,
|
|
60
|
+
parentLambda,
|
|
58
61
|
queryBuilderState,
|
|
59
62
|
);
|
|
60
63
|
|
|
@@ -77,6 +80,7 @@ export const processGraphFetchExpression = (
|
|
|
77
80
|
export const processGraphFetchSerializeExpression = (
|
|
78
81
|
expression: SimpleFunctionExpression,
|
|
79
82
|
queryBuilderState: QueryBuilderState,
|
|
83
|
+
parentLambda: LambdaFunction,
|
|
80
84
|
): void => {
|
|
81
85
|
// update fetch-structure
|
|
82
86
|
queryBuilderState.fetchStructureState.changeImplementation(
|
|
@@ -104,6 +108,7 @@ export const processGraphFetchSerializeExpression = (
|
|
|
104
108
|
);
|
|
105
109
|
QueryBuilderValueSpecificationProcessor.process(
|
|
106
110
|
precedingExpression,
|
|
111
|
+
parentLambda,
|
|
107
112
|
queryBuilderState,
|
|
108
113
|
);
|
|
109
114
|
|
|
@@ -39,14 +39,15 @@ import {
|
|
|
39
39
|
import type { QueryBuilderState } from '../../QueryBuilderState.js';
|
|
40
40
|
import {
|
|
41
41
|
type CompilationError,
|
|
42
|
+
type LambdaFunction,
|
|
43
|
+
type ValueSpecification,
|
|
44
|
+
type VariableExpression,
|
|
42
45
|
GRAPH_MANAGER_EVENT,
|
|
43
46
|
extractSourceInformationCoordinates,
|
|
44
47
|
LAMBDA_PIPE,
|
|
45
48
|
RawLambda,
|
|
46
49
|
isStubbed_RawLambda,
|
|
47
50
|
Class,
|
|
48
|
-
type LambdaFunction,
|
|
49
|
-
type ValueSpecification,
|
|
50
51
|
AbstractPropertyExpression,
|
|
51
52
|
matchFunctionName,
|
|
52
53
|
SimpleFunctionExpression,
|
|
@@ -91,9 +92,9 @@ import type { LambdaFunctionBuilderOption } from '../../QueryBuilderValueSpecifi
|
|
|
91
92
|
import { appendProjection } from './projection/QueryBuilderProjectionValueSpecificationBuilder.js';
|
|
92
93
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
|
|
93
94
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
|
94
|
-
import { QueryBuilderOLAPGroupByState } from './olapGroupBy/
|
|
95
|
+
import { QueryBuilderOLAPGroupByState } from './olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
|
95
96
|
import type { QueryBuilderTDS_OLAPOperator } from './olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js';
|
|
96
|
-
import { getQueryBuilderCoreOLAPGroupByOperators } from './olapGroupBy/
|
|
97
|
+
import { getQueryBuilderCoreOLAPGroupByOperators } from './olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js';
|
|
97
98
|
import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
|
|
98
99
|
|
|
99
100
|
export class QueryBuilderTDSState
|
|
@@ -636,6 +637,22 @@ export class QueryBuilderTDSState
|
|
|
636
637
|
}
|
|
637
638
|
}
|
|
638
639
|
|
|
640
|
+
isVariableUsed(variable: VariableExpression): boolean {
|
|
641
|
+
const columns = this.projectionColumns;
|
|
642
|
+
const derivationColumns = columns.filter(
|
|
643
|
+
filterByType(QueryBuilderDerivationProjectionColumnState),
|
|
644
|
+
);
|
|
645
|
+
if (derivationColumns.length) {
|
|
646
|
+
// we will return false if any derivation cols are present as we can't verify is the variable is ued
|
|
647
|
+
return false;
|
|
648
|
+
}
|
|
649
|
+
const usedInProjection = columns
|
|
650
|
+
.filter(filterByType(QueryBuilderSimpleProjectionColumnState))
|
|
651
|
+
.find((col) => col.isVariableUsed(variable));
|
|
652
|
+
const usedInPostFilter = this.postFilterState.isVariableUsed(variable);
|
|
653
|
+
return Boolean(usedInProjection ?? usedInPostFilter);
|
|
654
|
+
}
|
|
655
|
+
|
|
639
656
|
get hashCode(): string {
|
|
640
657
|
return hashArray([
|
|
641
658
|
QUERY_BUILDER_HASH_STRUCTURE.PROJECTION_STATE,
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
type LambdaFunction,
|
|
18
19
|
CollectionInstanceValue,
|
|
19
20
|
LambdaFunctionInstanceValue,
|
|
20
21
|
matchFunctionName,
|
|
@@ -41,6 +42,7 @@ export const processTDSAggregateExpression = (
|
|
|
41
42
|
expression: SimpleFunctionExpression,
|
|
42
43
|
parentExpression: SimpleFunctionExpression | undefined,
|
|
43
44
|
queryBuilderState: QueryBuilderState,
|
|
45
|
+
parentLambda: LambdaFunction,
|
|
44
46
|
): void => {
|
|
45
47
|
// check parent expression
|
|
46
48
|
assertTrue(
|
|
@@ -65,6 +67,7 @@ export const processTDSAggregateExpression = (
|
|
|
65
67
|
// TODO?: do we want to do more validation here for the shape of the column lambda?
|
|
66
68
|
guaranteeNonNullable(expression.parametersValues[0]),
|
|
67
69
|
expression,
|
|
70
|
+
parentLambda,
|
|
68
71
|
queryBuilderState,
|
|
69
72
|
);
|
|
70
73
|
|
|
@@ -137,6 +140,7 @@ export const processTDSAggregateExpression = (
|
|
|
137
140
|
export const processTDSGroupByExpression = (
|
|
138
141
|
expression: SimpleFunctionExpression,
|
|
139
142
|
queryBuilderState: QueryBuilderState,
|
|
143
|
+
parentLambda: LambdaFunction,
|
|
140
144
|
): void => {
|
|
141
145
|
// update fetch-structureTABULAR_DATA_STRUCTURE
|
|
142
146
|
queryBuilderState.fetchStructureState.changeImplementation(
|
|
@@ -164,6 +168,7 @@ export const processTDSGroupByExpression = (
|
|
|
164
168
|
);
|
|
165
169
|
QueryBuilderValueSpecificationProcessor.process(
|
|
166
170
|
precedingExpression,
|
|
171
|
+
parentLambda,
|
|
167
172
|
queryBuilderState,
|
|
168
173
|
);
|
|
169
174
|
|
|
@@ -178,6 +183,7 @@ export const processTDSGroupByExpression = (
|
|
|
178
183
|
QueryBuilderValueSpecificationProcessor.processChild(
|
|
179
184
|
value,
|
|
180
185
|
expression,
|
|
186
|
+
parentLambda,
|
|
181
187
|
queryBuilderState,
|
|
182
188
|
),
|
|
183
189
|
);
|
|
@@ -193,6 +199,7 @@ export const processTDSGroupByExpression = (
|
|
|
193
199
|
QueryBuilderValueSpecificationProcessor.processChild(
|
|
194
200
|
value,
|
|
195
201
|
expression,
|
|
202
|
+
parentLambda,
|
|
196
203
|
queryBuilderState,
|
|
197
204
|
),
|
|
198
205
|
);
|
|
File without changes
|
|
File without changes
|
|
@@ -44,11 +44,12 @@ import {
|
|
|
44
44
|
QueryBuilderOLAPGroupByColumnState,
|
|
45
45
|
QueryBuilderTDS_OLAPAggreationOperatorState,
|
|
46
46
|
QueryBuilderTDS_OLAPRankOperatorState,
|
|
47
|
-
} from './
|
|
47
|
+
} from './QueryBuilderOLAPGroupByState.js';
|
|
48
48
|
|
|
49
49
|
export const processTDS_OLAPGroupByExpression = (
|
|
50
50
|
expression: SimpleFunctionExpression,
|
|
51
51
|
queryBuilderState: QueryBuilderState,
|
|
52
|
+
parentLambda: LambdaFunction,
|
|
52
53
|
): void => {
|
|
53
54
|
// check parameters
|
|
54
55
|
const parametersLength = expression.parametersValues.length;
|
|
@@ -90,6 +91,7 @@ export const processTDS_OLAPGroupByExpression = (
|
|
|
90
91
|
);
|
|
91
92
|
QueryBuilderValueSpecificationProcessor.process(
|
|
92
93
|
precedingExpression,
|
|
94
|
+
parentLambda,
|
|
93
95
|
queryBuilderState,
|
|
94
96
|
);
|
|
95
97
|
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
type QueryBuilderOLAPGroupByColumnState,
|
|
35
35
|
type QueryBuilderOLAPGroupByState,
|
|
36
36
|
QueryBuilderTDS_OLAPAggreationOperatorState,
|
|
37
|
-
} from './
|
|
37
|
+
} from './QueryBuilderOLAPGroupByState.js';
|
|
38
38
|
|
|
39
39
|
const appendOLAPGroupByColumnState = (
|
|
40
40
|
olapGroupByColumnState: QueryBuilderOLAPGroupByColumnState,
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
type Type,
|
|
21
21
|
type ValueSpecification,
|
|
22
22
|
type ExecutionResult,
|
|
23
|
+
type VariableExpression,
|
|
23
24
|
Enumeration,
|
|
24
25
|
PRIMITIVE_TYPE,
|
|
25
26
|
observe_ValueSpecification,
|
|
@@ -42,6 +43,7 @@ import {
|
|
|
42
43
|
hashArray,
|
|
43
44
|
uniq,
|
|
44
45
|
type Hashable,
|
|
46
|
+
isNonNullable,
|
|
45
47
|
} from '@finos/legend-shared';
|
|
46
48
|
import {
|
|
47
49
|
action,
|
|
@@ -68,6 +70,7 @@ import { QUERY_BUILDER_GROUP_OPERATION } from '../../../QueryBuilderGroupOperati
|
|
|
68
70
|
import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
|
69
71
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../graphManager/QueryBuilderHashUtils.js';
|
|
70
72
|
import type { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
|
|
73
|
+
import { isValueExpressionReferencesinValue } from '../../../QueryBuilderValueSpecificationHelper.js';
|
|
71
74
|
|
|
72
75
|
export enum QUERY_BUILDER_POST_FILTER_DND_TYPE {
|
|
73
76
|
GROUP_CONDITION = 'GROUP_CONDITION',
|
|
@@ -876,6 +879,16 @@ export class QueryBuilderPostFilterState
|
|
|
876
879
|
Array.from(this.nodes.values()).forEach((node) => node.setIsOpen(true));
|
|
877
880
|
}
|
|
878
881
|
|
|
882
|
+
isVariableUsed(variable: VariableExpression): boolean {
|
|
883
|
+
return Boolean(
|
|
884
|
+
Array.from(this.nodes.values())
|
|
885
|
+
.filter(filterByType(QueryBuilderPostFilterTreeConditionNodeData))
|
|
886
|
+
.map((node) => node.condition.value)
|
|
887
|
+
.filter(isNonNullable)
|
|
888
|
+
.find((value) => isValueExpressionReferencesinValue(variable, value)),
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
|
|
879
892
|
get hashCode(): string {
|
|
880
893
|
return hashArray([
|
|
881
894
|
QUERY_BUILDER_HASH_STRUCTURE.POST_FILTER_STATE,
|
package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { Multiplicity } from '@finos/legend-graph';
|
|
18
18
|
import { UnsupportedOperationError } from '@finos/legend-shared';
|
|
19
19
|
import { QueryBuilderAggregateColumnState } from '../../aggregation/QueryBuilderAggregationState.js';
|
|
20
|
-
import { QueryBuilderOLAPGroupByColumnState } from '../../olapGroupBy/
|
|
20
|
+
import { QueryBuilderOLAPGroupByColumnState } from '../../olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
|
21
21
|
import { QueryBuilderSimpleProjectionColumnState } from '../../projection/QueryBuilderProjectionColumnState.js';
|
|
22
22
|
import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
|
|
23
23
|
|
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
} from '../../../QueryBuilderConfig.js';
|
|
58
58
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../graphManager/QueryBuilderHashUtils.js';
|
|
59
59
|
import { LambdaEditorState } from '../../../shared/LambdaEditorState.js';
|
|
60
|
+
import { isValueExpressionReferencesinValue } from '../../../QueryBuilderValueSpecificationHelper.js';
|
|
60
61
|
|
|
61
62
|
export const QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE = 'PROJECTION_COLUMN';
|
|
62
63
|
|
|
@@ -124,6 +125,17 @@ export class QueryBuilderSimpleProjectionColumnState
|
|
|
124
125
|
this.lambdaParameterName = val;
|
|
125
126
|
}
|
|
126
127
|
|
|
128
|
+
isVariableUsed(variable: VariableExpression): boolean {
|
|
129
|
+
return Boolean(
|
|
130
|
+
this.propertyExpressionState.derivedPropertyExpressionStates.find(
|
|
131
|
+
(derived) =>
|
|
132
|
+
derived.parameterValues.find((param) =>
|
|
133
|
+
isValueExpressionReferencesinValue(variable, param),
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
127
139
|
changeProperty(
|
|
128
140
|
node: QueryBuilderExplorerTreePropertyNodeData,
|
|
129
141
|
humanizePropertyName: boolean,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import {
|
|
18
18
|
type INTERNAL__UnknownValueSpecification,
|
|
19
19
|
type ValueSpecification,
|
|
20
|
+
type LambdaFunction,
|
|
20
21
|
AbstractPropertyExpression,
|
|
21
22
|
CollectionInstanceValue,
|
|
22
23
|
DerivedProperty,
|
|
@@ -59,6 +60,7 @@ import {
|
|
|
59
60
|
export const processTDSProjectExpression = (
|
|
60
61
|
expression: SimpleFunctionExpression,
|
|
61
62
|
queryBuilderState: QueryBuilderState,
|
|
63
|
+
parentLambda: LambdaFunction,
|
|
62
64
|
): void => {
|
|
63
65
|
// update fetch-structure
|
|
64
66
|
queryBuilderState.fetchStructureState.changeImplementation(
|
|
@@ -87,6 +89,7 @@ export const processTDSProjectExpression = (
|
|
|
87
89
|
);
|
|
88
90
|
QueryBuilderValueSpecificationProcessor.process(
|
|
89
91
|
precedingExpression,
|
|
92
|
+
parentLambda,
|
|
90
93
|
queryBuilderState,
|
|
91
94
|
);
|
|
92
95
|
|
|
@@ -101,6 +104,7 @@ export const processTDSProjectExpression = (
|
|
|
101
104
|
QueryBuilderValueSpecificationProcessor.processChild(
|
|
102
105
|
value,
|
|
103
106
|
expression,
|
|
107
|
+
parentLambda,
|
|
104
108
|
queryBuilderState,
|
|
105
109
|
),
|
|
106
110
|
);
|
|
@@ -236,6 +240,7 @@ export const processTDSProjectionDerivationExpression = (
|
|
|
236
240
|
export const processTDSTakeExpression = (
|
|
237
241
|
expression: SimpleFunctionExpression,
|
|
238
242
|
queryBuilderState: QueryBuilderState,
|
|
243
|
+
parentLambda: LambdaFunction,
|
|
239
244
|
): void => {
|
|
240
245
|
// check parameters
|
|
241
246
|
assertTrue(
|
|
@@ -263,6 +268,7 @@ export const processTDSTakeExpression = (
|
|
|
263
268
|
);
|
|
264
269
|
QueryBuilderValueSpecificationProcessor.process(
|
|
265
270
|
precedingExpression,
|
|
271
|
+
parentLambda,
|
|
266
272
|
queryBuilderState,
|
|
267
273
|
);
|
|
268
274
|
|
|
@@ -283,6 +289,7 @@ export const processTDSTakeExpression = (
|
|
|
283
289
|
export const processTDSDistinctExpression = (
|
|
284
290
|
expression: SimpleFunctionExpression,
|
|
285
291
|
queryBuilderState: QueryBuilderState,
|
|
292
|
+
parentLambda: LambdaFunction,
|
|
286
293
|
): void => {
|
|
287
294
|
// check parameters
|
|
288
295
|
assertTrue(
|
|
@@ -309,6 +316,7 @@ export const processTDSDistinctExpression = (
|
|
|
309
316
|
);
|
|
310
317
|
QueryBuilderValueSpecificationProcessor.process(
|
|
311
318
|
precedingExpression,
|
|
319
|
+
parentLambda,
|
|
312
320
|
queryBuilderState,
|
|
313
321
|
);
|
|
314
322
|
|
|
@@ -326,6 +334,7 @@ export const processTDSDistinctExpression = (
|
|
|
326
334
|
export const processTDSSortExpression = (
|
|
327
335
|
expression: SimpleFunctionExpression,
|
|
328
336
|
queryBuilderState: QueryBuilderState,
|
|
337
|
+
parentLambda: LambdaFunction,
|
|
329
338
|
): void => {
|
|
330
339
|
// check parameters
|
|
331
340
|
assertTrue(
|
|
@@ -353,6 +362,7 @@ export const processTDSSortExpression = (
|
|
|
353
362
|
);
|
|
354
363
|
QueryBuilderValueSpecificationProcessor.process(
|
|
355
364
|
precedingExpression,
|
|
365
|
+
parentLambda,
|
|
356
366
|
queryBuilderState,
|
|
357
367
|
);
|
|
358
368
|
|
|
@@ -367,6 +377,7 @@ export const processTDSSortExpression = (
|
|
|
367
377
|
QueryBuilderValueSpecificationProcessor.processChild(
|
|
368
378
|
value,
|
|
369
379
|
expression,
|
|
380
|
+
parentLambda,
|
|
370
381
|
queryBuilderState,
|
|
371
382
|
),
|
|
372
383
|
);
|
package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
|
48
48
|
import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
|
|
49
49
|
import { buildPropertyExpressionChain } from '../../../QueryBuilderValueSpecificationBuilderHelper.js';
|
|
50
|
-
import { appendOLAPGroupByState } from '../olapGroupBy/
|
|
50
|
+
import { appendOLAPGroupByState } from '../olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js';
|
|
51
51
|
import { appendPostFilter } from '../post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js';
|
|
52
52
|
|
|
53
53
|
const buildSortExpression = (
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
ActionState,
|
|
32
32
|
type Hashable,
|
|
33
33
|
hashArray,
|
|
34
|
+
isNonNullable,
|
|
34
35
|
} from '@finos/legend-shared';
|
|
35
36
|
import type { QueryBuilderExplorerTreeDragSource } from '../explorer/QueryBuilderExplorerState.js';
|
|
36
37
|
import { QueryBuilderPropertyExpressionState } from '../QueryBuilderPropertyEditorState.js';
|
|
@@ -39,6 +40,7 @@ import {
|
|
|
39
40
|
type ExecutionResult,
|
|
40
41
|
type AbstractPropertyExpression,
|
|
41
42
|
type ValueSpecification,
|
|
43
|
+
type VariableExpression,
|
|
42
44
|
observe_ValueSpecification,
|
|
43
45
|
} from '@finos/legend-graph';
|
|
44
46
|
import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../QueryBuilderConfig.js';
|
|
@@ -51,6 +53,7 @@ import {
|
|
|
51
53
|
import type { QueryBuilderFilterOperator } from './QueryBuilderFilterOperator.js';
|
|
52
54
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../QueryBuilderGroupOperationHelper.js';
|
|
53
55
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../graphManager/QueryBuilderHashUtils.js';
|
|
56
|
+
import { isValueExpressionReferencesinValue } from '../QueryBuilderValueSpecificationHelper.js';
|
|
54
57
|
|
|
55
58
|
export enum QUERY_BUILDER_FILTER_DND_TYPE {
|
|
56
59
|
GROUP_CONDITION = 'GROUP_CONDITION',
|
|
@@ -791,6 +794,16 @@ export class QueryBuilderFilterState
|
|
|
791
794
|
Array.from(this.nodes.values()).forEach((node) => node.setIsOpen(true));
|
|
792
795
|
}
|
|
793
796
|
|
|
797
|
+
isVariableUsed(variable: VariableExpression): boolean {
|
|
798
|
+
return Boolean(
|
|
799
|
+
Array.from(this.nodes.values())
|
|
800
|
+
.filter(filterByType(QueryBuilderFilterTreeConditionNodeData))
|
|
801
|
+
.map((node) => node.condition.value)
|
|
802
|
+
.filter(isNonNullable)
|
|
803
|
+
.find((value) => isValueExpressionReferencesinValue(variable, value)),
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
|
|
794
807
|
get hashCode(): string {
|
|
795
808
|
return hashArray([
|
|
796
809
|
QUERY_BUILDER_HASH_STRUCTURE.FILTER_STATE,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { isNonNullable, guaranteeNonNullable } from '@finos/legend-shared';
|
|
18
18
|
import {
|
|
19
19
|
type ValueSpecification,
|
|
20
|
+
type LambdaFunction,
|
|
20
21
|
extractElementNameFromPath,
|
|
21
22
|
SimpleFunctionExpression,
|
|
22
23
|
} from '@finos/legend-graph';
|
|
@@ -80,22 +81,25 @@ const buildFilterConditionExpression = (
|
|
|
80
81
|
|
|
81
82
|
export const buildFilterExpression = (
|
|
82
83
|
filterState: QueryBuilderFilterState,
|
|
83
|
-
|
|
84
|
-
):
|
|
84
|
+
lambdaFunction: LambdaFunction,
|
|
85
|
+
): void => {
|
|
85
86
|
const filterConditionExpressions = filterState.rootIds
|
|
86
87
|
.map((e) => guaranteeNonNullable(filterState.nodes.get(e)))
|
|
87
88
|
.map((e) => buildFilterConditionExpression(filterState, e))
|
|
88
89
|
.filter(isNonNullable);
|
|
89
90
|
|
|
90
91
|
if (!filterConditionExpressions.length) {
|
|
91
|
-
return
|
|
92
|
+
return;
|
|
92
93
|
}
|
|
93
94
|
// main filter expression
|
|
94
95
|
const filterExpression = new SimpleFunctionExpression(
|
|
95
96
|
extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.FILTER),
|
|
96
97
|
);
|
|
98
|
+
const currentExpression = guaranteeNonNullable(
|
|
99
|
+
lambdaFunction.expressionSequence[0],
|
|
100
|
+
);
|
|
97
101
|
// param [0]
|
|
98
|
-
filterExpression.parametersValues.push(
|
|
102
|
+
filterExpression.parametersValues.push(currentExpression);
|
|
99
103
|
// param [1]
|
|
100
104
|
filterExpression.parametersValues.push(
|
|
101
105
|
buildGenericLambdaFunctionInstanceValue(
|
|
@@ -104,5 +108,6 @@ export const buildFilterExpression = (
|
|
|
104
108
|
filterState.queryBuilderState.graphManagerState.graph,
|
|
105
109
|
),
|
|
106
110
|
);
|
|
107
|
-
|
|
111
|
+
// reprocess filter as main expression
|
|
112
|
+
lambdaFunction.expressionSequence[0] = filterExpression;
|
|
108
113
|
};
|