@finos/legend-query-builder 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts +0 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +42 -9
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.js +2 -5
- package/lib/components/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts +0 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +2 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +0 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +0 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +0 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +3 -3
- package/lib/components/QueryBuilderSideBar.d.ts +0 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +2 -1
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +0 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +0 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.d.ts +1 -0
- package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.js +1 -0
- package/lib/components/QueryBuilder_TestID.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +5 -5
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +2 -2
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js +363 -0
- package/lib/components/fetch-structure/QueryBuilderOlapGroupByPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +21 -53
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +22 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +32 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +2 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts +27 -0
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +61 -0
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -13
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +0 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +0 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +23 -7
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +0 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +5 -1
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +14 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +15 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +7 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.js +7 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +4 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +1 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +50 -0
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.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/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +7 -1
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderStateTestUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateTestUtils.js +2 -4
- package/lib/stores/QueryBuilderStateTestUtils.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +2 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.js +3 -3
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +3 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +2 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js +20 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts +23 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js +41 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js.map +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +11 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +44 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +4 -4
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +8 -7
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts +18 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js +36 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts +91 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js +272 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts +19 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js +100 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts +19 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js +83 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts +29 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js +30 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js +50 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js +51 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js +50 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js +50 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts +25 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js +51 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts +24 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js +48 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +6 -4
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +14 -3
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +8 -11
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +5 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +4 -4
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +3 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts +4 -6
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +6 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -0
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +6 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +2 -0
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +6 -0
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/QueryBuilder.tsx +110 -35
- package/src/components/QueryBuilderComponentTestUtils.tsx +9 -11
- package/src/components/QueryBuilderDiffPanel.tsx +2 -2
- package/src/components/QueryBuilderResultPanel.tsx +4 -4
- package/src/components/QueryBuilderSideBar.tsx +4 -1
- package/src/components/QueryBuilder_TestID.ts +1 -0
- package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +6 -6
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +2 -3
- package/src/components/fetch-structure/QueryBuilderOlapGroupByPanel.tsx +1140 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +31 -106
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +69 -0
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +4 -1
- package/src/components/fetch-structure/QueryBuilderTDSComponentHelper.tsx +118 -0
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +4 -23
- package/src/components/shared/LambdaEditor.tsx +25 -22
- package/src/components/workflows/ServiceQueryBuilder.tsx +10 -2
- package/src/graphManager/QueryBuilderHashUtils.ts +16 -0
- package/src/graphManager/QueryBuilderSupportedFunctions.ts +7 -0
- package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +14 -0
- package/src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +129 -0
- package/src/stores/QueryBuilderStateBuilder.ts +14 -1
- package/src/stores/QueryBuilderStateTestUtils.ts +9 -13
- package/src/stores/QueryBuilderTypeaheadHelper.ts +2 -2
- package/src/stores/explorer/QueryBuilderExplorerState.ts +3 -3
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +2 -1
- package/src/stores/fetch-structure/tds/QueryBuilderTDSColumnState_.ts +28 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSHelper.ts +79 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +68 -1
- package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +2 -2
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.ts +1 -1
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +11 -9
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.ts +39 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.ts +377 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.ts +237 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.ts +148 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_.ts +43 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Average.ts +56 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Count.ts +57 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Max.ts +56 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Min.ts +56 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapOperator_Sum.ts +57 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_AverageRank_.ts +54 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_DenseRank_.ts +54 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_Rank_.ts +54 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDSOlapRankOperator_RowNumber_.ts +54 -0
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +2 -2
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +22 -10
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +11 -19
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +8 -7
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +4 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +2 -2
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +3 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +9 -11
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +8 -4
- package/src/stores/filter/QueryBuilderFilterState.ts +7 -0
- package/tsconfig.json +19 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderAggregationState.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EACL,
|
1
|
+
{"version":3,"file":"QueryBuilderAggregationState.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EACL,WAAW,EACX,cAAc,EAEd,SAAS,GACV,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAI9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E,MAAM,OAAO,gCACX,SAAQ,0BAA0B;IAGzB,gBAAgB,CAA+B;IACxD,qBAAqB,CAAoC;IACzD,mBAAmB,GAAW,4BAA4B,CAAC;IAC3D,QAAQ,CAAgC;IAExC,YACE,gBAA8C,EAC9C,qBAAwD,EACxD,QAAuC;QAEvC,KAAK,EAAE,CAAC;QACR,cAAc,CAAC,IAAI,EAAE;YACnB,qBAAqB,EAAE,UAAU;YACjC,mBAAmB,EAAE,UAAU;YAC/B,QAAQ,EAAE,UAAU;YACpB,cAAc,EAAE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AC,QAAQ,CAAC,UAAU,CACtB,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAC9D,CAAC,CACF,CAAC;gBAEF,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;aACzC;SACF;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,iBAAiB;YAC9C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;SACxB,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import type { QueryBuilderTDSOlapOperator } from './operators/QueryBuilderTDSOlapOperator_.js';
|
17
|
+
export declare const getQueryBuilderCoreOlapGroupByOperators: () => QueryBuilderTDSOlapOperator[];
|
18
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByOperatorLoader.d.ts.map
|
package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByOperatorLoader.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAW/F,eAAO,MAAM,uCAAuC,QAC9C,2BAA2B,EAU9B,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { QueryBuilderTDSOlapRankOperator_AverageRank } from './operators/QueryBuilderTDSOlapRankOperator_AverageRank_.js';
|
17
|
+
import { QueryBuilderTDSOlapRankOperator_DenseRank } from './operators/QueryBuilderTDSOlapRankOperator_DenseRank_.js';
|
18
|
+
import { QueryBuilderTDSOlapRankOperator_Rank } from './operators/QueryBuilderTDSOlapRankOperator_Rank_.js';
|
19
|
+
import { QueryBuilderTDSOlapRankOperator_RowNumber } from './operators/QueryBuilderTDSOlapRankOperator_RowNumber_.js';
|
20
|
+
import { QueryBuilderTDSOlapOperator_Sum } from './operators/QueryBuilderTDSOlapOperator_Sum.js';
|
21
|
+
import { QueryBuilderTDSOlapOperator_Count } from './operators/QueryBuilderTDSOlapOperator_Count.js';
|
22
|
+
import { QueryBuilderTDSOlapOperator_Max } from './operators/QueryBuilderTDSOlapOperator_Max.js';
|
23
|
+
import { QueryBuilderTDSOlapOperator_Min } from './operators/QueryBuilderTDSOlapOperator_Min.js';
|
24
|
+
import { QueryBuilderTDSOlapOperator_Average } from './operators/QueryBuilderTDSOlapOperator_Average.js';
|
25
|
+
export const getQueryBuilderCoreOlapGroupByOperators = () => [
|
26
|
+
new QueryBuilderTDSOlapOperator_Sum(),
|
27
|
+
new QueryBuilderTDSOlapOperator_Count(),
|
28
|
+
new QueryBuilderTDSOlapOperator_Max(),
|
29
|
+
new QueryBuilderTDSOlapOperator_Min(),
|
30
|
+
new QueryBuilderTDSOlapOperator_Average(),
|
31
|
+
new QueryBuilderTDSOlapRankOperator_AverageRank(),
|
32
|
+
new QueryBuilderTDSOlapRankOperator_DenseRank(),
|
33
|
+
new QueryBuilderTDSOlapRankOperator_Rank(),
|
34
|
+
new QueryBuilderTDSOlapRankOperator_RowNumber(),
|
35
|
+
];
|
36
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByOperatorLoader.js.map
|
package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByOperatorLoader.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByOperatorLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,2CAA2C,EAAE,MAAM,6DAA6D,CAAC;AAC1H,OAAO,EAAE,yCAAyC,EAAE,MAAM,2DAA2D,CAAC;AACtH,OAAO,EAAE,oCAAoC,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,yCAAyC,EAAE,MAAM,2DAA2D,CAAC;AACtH,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,mCAAmC,EAAE,MAAM,oDAAoD,CAAC;AAEzG,MAAM,CAAC,MAAM,uCAAuC,GAClD,GAAkC,EAAE,CAAC;IACnC,IAAI,+BAA+B,EAAE;IACrC,IAAI,iCAAiC,EAAE;IACvC,IAAI,+BAA+B,EAAE;IACrC,IAAI,+BAA+B,EAAE;IACrC,IAAI,mCAAmC,EAAE;IACzC,IAAI,2CAA2C,EAAE;IACjD,IAAI,yCAAyC,EAAE;IAC/C,IAAI,oCAAoC,EAAE;IAC1C,IAAI,yCAAyC,EAAE;CAChD,CAAC"}
|
@@ -0,0 +1,91 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { type Type } from '@finos/legend-graph';
|
17
|
+
import { type Hashable } from '@finos/legend-shared';
|
18
|
+
import type { QueryBuilderProjectionColumnDragSource } from '../projection/QueryBuilderProjectionColumnState.js';
|
19
|
+
import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState_.js';
|
20
|
+
import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
21
|
+
import type { COLUMN_SORT_TYPE } from '../QueryResultSetModifierState.js';
|
22
|
+
import type { QueryBuilderTDSOlapOperator } from './operators/QueryBuilderTDSOlapOperator_.js';
|
23
|
+
export declare const QUERY_BUILDER_OLAP_COLUMN_DND_TYPE = "OLAP_COLUMN";
|
24
|
+
export interface QueryBuilderOlapColumnDragSource {
|
25
|
+
columnState: QueryBuilderOlapGroupByColumnState;
|
26
|
+
}
|
27
|
+
export declare type QueryBuilderOlapDropTarget = QueryBuilderProjectionColumnDragSource | QueryBuilderOlapColumnDragSource;
|
28
|
+
export declare class OlapGroupByColumnSortByState implements Hashable {
|
29
|
+
columnState: QueryBuilderTDSColumnState;
|
30
|
+
sortType: COLUMN_SORT_TYPE;
|
31
|
+
constructor(columnState: QueryBuilderTDSColumnState, sortType: COLUMN_SORT_TYPE);
|
32
|
+
setColumnState(colState: QueryBuilderTDSColumnState): void;
|
33
|
+
setSortType(type: COLUMN_SORT_TYPE): void;
|
34
|
+
get hashCode(): string;
|
35
|
+
}
|
36
|
+
export declare abstract class QueryBuilderTDSOlapOperatorState implements Hashable {
|
37
|
+
readonly olapState: QueryBuilderOlapGroupByState;
|
38
|
+
lambdaParameterName: string;
|
39
|
+
operator: QueryBuilderTDSOlapOperator;
|
40
|
+
constructor(olapState: QueryBuilderOlapGroupByState, operator: QueryBuilderTDSOlapOperator);
|
41
|
+
setLambdaParameterName(paramName: string): void;
|
42
|
+
setOperator(val: QueryBuilderTDSOlapOperator): void;
|
43
|
+
get hashCode(): string;
|
44
|
+
}
|
45
|
+
export declare class QueryBuilderTDSOlapRankOperatorState extends QueryBuilderTDSOlapOperatorState {
|
46
|
+
constructor(olapState: QueryBuilderOlapGroupByState, operator: QueryBuilderTDSOlapOperator);
|
47
|
+
}
|
48
|
+
export declare class QueryBuilderTDSOlapAggreationOperatorState extends QueryBuilderTDSOlapOperatorState {
|
49
|
+
columnState: QueryBuilderTDSColumnState;
|
50
|
+
constructor(olapState: QueryBuilderOlapGroupByState, operator: QueryBuilderTDSOlapOperator, columnState: QueryBuilderTDSColumnState);
|
51
|
+
setColumnState(val: QueryBuilderTDSColumnState): void;
|
52
|
+
get hashCode(): string;
|
53
|
+
}
|
54
|
+
export declare class QueryBuilderOlapGroupByColumnState extends QueryBuilderTDSColumnState implements Hashable {
|
55
|
+
readonly olapState: QueryBuilderOlapGroupByState;
|
56
|
+
windowColumns: QueryBuilderTDSColumnState[];
|
57
|
+
sortByState: OlapGroupByColumnSortByState | undefined;
|
58
|
+
operationState: QueryBuilderTDSOlapOperatorState;
|
59
|
+
columnName: string;
|
60
|
+
constructor(olapState: QueryBuilderOlapGroupByState, windowColumns: QueryBuilderTDSColumnState[], sortType: OlapGroupByColumnSortByState | undefined, operationState: QueryBuilderTDSOlapOperatorState, columnName: string);
|
61
|
+
get columnOlapGroupIdx(): number;
|
62
|
+
get possibleReferencedColumns(): QueryBuilderTDSColumnState[];
|
63
|
+
get referencedTDSColumns(): QueryBuilderTDSColumnState[];
|
64
|
+
getColumnType(): Type | undefined;
|
65
|
+
setColumnName(val: string): void;
|
66
|
+
setOperatorState(op: QueryBuilderTDSOlapOperatorState): void;
|
67
|
+
setSortBy(val: OlapGroupByColumnSortByState | undefined): void;
|
68
|
+
changeWindow(val: QueryBuilderTDSColumnState, idx: number): void;
|
69
|
+
addWindow(val: QueryBuilderTDSColumnState): void;
|
70
|
+
deleteWindow(val: QueryBuilderTDSColumnState): void;
|
71
|
+
possibleAggregatedColumns(op: QueryBuilderTDSOlapOperator): QueryBuilderTDSColumnState[];
|
72
|
+
changeOperator(olapOp: QueryBuilderTDSOlapOperator): void;
|
73
|
+
changeSortBy(sortOp: COLUMN_SORT_TYPE | undefined): void;
|
74
|
+
get hashCode(): string;
|
75
|
+
}
|
76
|
+
export declare class QueryBuilderOlapGroupByState implements Hashable {
|
77
|
+
readonly tdsState: QueryBuilderTDSState;
|
78
|
+
olapColumns: QueryBuilderOlapGroupByColumnState[];
|
79
|
+
operators: QueryBuilderTDSOlapOperator[];
|
80
|
+
editColumn: QueryBuilderOlapGroupByColumnState | undefined;
|
81
|
+
constructor(tdsState: QueryBuilderTDSState, operators: QueryBuilderTDSOlapOperator[]);
|
82
|
+
get isEmpty(): boolean;
|
83
|
+
get referencedTDSColumns(): QueryBuilderTDSColumnState[];
|
84
|
+
setEditColumn(col: QueryBuilderOlapGroupByColumnState | undefined): void;
|
85
|
+
findOperator(func: string): QueryBuilderTDSOlapOperator | undefined;
|
86
|
+
addOlapColumn(olapGroupByCol: QueryBuilderOlapGroupByColumnState): void;
|
87
|
+
removeColumn(column: QueryBuilderOlapGroupByColumnState): void;
|
88
|
+
moveColumn(fromIndex: number, toIndex: number): void;
|
89
|
+
get hashCode(): string;
|
90
|
+
}
|
91
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByState.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,oDAAoD,CAAC;AACjH,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAE/F,eAAO,MAAM,kCAAkC,gBAAgB,CAAC;AAEhE,MAAM,WAAW,gCAAgC;IAC/C,WAAW,EAAE,kCAAkC,CAAC;CACjD;AAED,oBAAY,0BAA0B,GAClC,sCAAsC,GACtC,gCAAgC,CAAC;AAErC,qBAAa,4BAA6B,YAAW,QAAQ;IAC3D,WAAW,EAAE,0BAA0B,CAAC;IACxC,QAAQ,EAAE,gBAAgB,CAAC;gBAGzB,WAAW,EAAE,0BAA0B,EACvC,QAAQ,EAAE,gBAAgB;IAa5B,cAAc,CAAC,QAAQ,EAAE,0BAA0B,GAAG,IAAI;IAI1D,WAAW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AAM,EAAE,kCAAkC,GAAG,IAAI;IAI9D,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IASpD,IAAI,QAAQ,IAAI,MAAM,CAKrB;CACF"}
|
@@ -0,0 +1,272 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { matchFunctionName } from '@finos/legend-graph';
|
17
|
+
import { addUniqueEntry, deleteEntry, guaranteeNonNullable, hashArray, uniq, } from '@finos/legend-shared';
|
18
|
+
import { action, makeObservable, observable } from 'mobx';
|
19
|
+
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../graphManager/QueryBuilderHashUtils.js';
|
20
|
+
import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../../../QueryBuilderConfig.js';
|
21
|
+
import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState_.js';
|
22
|
+
export const QUERY_BUILDER_OLAP_COLUMN_DND_TYPE = 'OLAP_COLUMN';
|
23
|
+
export class OlapGroupByColumnSortByState {
|
24
|
+
columnState;
|
25
|
+
sortType;
|
26
|
+
constructor(columnState, sortType) {
|
27
|
+
makeObservable(this, {
|
28
|
+
columnState: observable,
|
29
|
+
sortType: observable,
|
30
|
+
setColumnState: action,
|
31
|
+
setSortType: action,
|
32
|
+
});
|
33
|
+
this.columnState = columnState;
|
34
|
+
this.sortType = sortType;
|
35
|
+
}
|
36
|
+
setColumnState(colState) {
|
37
|
+
this.columnState = colState;
|
38
|
+
}
|
39
|
+
setSortType(type) {
|
40
|
+
this.sortType = type;
|
41
|
+
}
|
42
|
+
get hashCode() {
|
43
|
+
return hashArray([
|
44
|
+
QUERY_BUILDER_HASH_STRUCTURE.OLAP_GROUPBY_COLUMN_SORTBY_STATE,
|
45
|
+
this.sortType,
|
46
|
+
this.columnState.columnName,
|
47
|
+
]);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
export class QueryBuilderTDSOlapOperatorState {
|
51
|
+
olapState;
|
52
|
+
lambdaParameterName = DEFAULT_LAMBDA_VARIABLE_NAME;
|
53
|
+
operator;
|
54
|
+
constructor(olapState, operator) {
|
55
|
+
this.olapState = olapState;
|
56
|
+
this.operator = operator;
|
57
|
+
}
|
58
|
+
setLambdaParameterName(paramName) {
|
59
|
+
this.lambdaParameterName = paramName;
|
60
|
+
}
|
61
|
+
setOperator(val) {
|
62
|
+
this.operator = val;
|
63
|
+
}
|
64
|
+
get hashCode() {
|
65
|
+
return hashArray([
|
66
|
+
QUERY_BUILDER_HASH_STRUCTURE.OLAP_GROUPBY_OPERATION_STATE,
|
67
|
+
this.lambdaParameterName,
|
68
|
+
this.operator,
|
69
|
+
]);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
export class QueryBuilderTDSOlapRankOperatorState extends QueryBuilderTDSOlapOperatorState {
|
73
|
+
constructor(olapState, operator) {
|
74
|
+
super(olapState, operator);
|
75
|
+
makeObservable(this, {
|
76
|
+
setLambdaParameterName: action,
|
77
|
+
});
|
78
|
+
}
|
79
|
+
}
|
80
|
+
export class QueryBuilderTDSOlapAggreationOperatorState extends QueryBuilderTDSOlapOperatorState {
|
81
|
+
columnState;
|
82
|
+
constructor(olapState, operator, columnState) {
|
83
|
+
super(olapState, operator);
|
84
|
+
makeObservable(this, {
|
85
|
+
columnState: observable,
|
86
|
+
setColumnState: action,
|
87
|
+
setLambdaParameterName: action,
|
88
|
+
});
|
89
|
+
this.columnState = columnState;
|
90
|
+
}
|
91
|
+
setColumnState(val) {
|
92
|
+
this.columnState = val;
|
93
|
+
}
|
94
|
+
get hashCode() {
|
95
|
+
return hashArray([
|
96
|
+
QUERY_BUILDER_HASH_STRUCTURE.OLAP_GROUPBY_AGG_OPERATION_STATE,
|
97
|
+
this.lambdaParameterName,
|
98
|
+
this.operator,
|
99
|
+
this.columnState.columnName,
|
100
|
+
]);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
export class QueryBuilderOlapGroupByColumnState extends QueryBuilderTDSColumnState {
|
104
|
+
olapState;
|
105
|
+
windowColumns = [];
|
106
|
+
sortByState;
|
107
|
+
operationState;
|
108
|
+
columnName;
|
109
|
+
constructor(olapState, windowColumns, sortType, operationState, columnName) {
|
110
|
+
super();
|
111
|
+
makeObservable(this, {
|
112
|
+
windowColumns: observable,
|
113
|
+
sortByState: observable,
|
114
|
+
operationState: observable,
|
115
|
+
columnName: observable,
|
116
|
+
setOperatorState: observable,
|
117
|
+
setColumnName: action,
|
118
|
+
setSortBy: action,
|
119
|
+
changeWindow: action,
|
120
|
+
deleteWindow: action,
|
121
|
+
addWindow: action,
|
122
|
+
changeOperator: action,
|
123
|
+
changeSortBy: action,
|
124
|
+
});
|
125
|
+
this.olapState = olapState;
|
126
|
+
this.windowColumns = windowColumns;
|
127
|
+
this.sortByState = sortType;
|
128
|
+
this.operationState = operationState;
|
129
|
+
this.columnName = columnName;
|
130
|
+
}
|
131
|
+
get columnOlapGroupIdx() {
|
132
|
+
return this.olapState.olapColumns.findIndex((e) => e === this);
|
133
|
+
}
|
134
|
+
get possibleReferencedColumns() {
|
135
|
+
// column can only reference TDS columns already defined, i.e in an earlier index of the olap columns
|
136
|
+
const idx = this.olapState.tdsState.tdsColumns.findIndex((e) => e === this);
|
137
|
+
if (idx === -1) {
|
138
|
+
return this.olapState.tdsState.tdsColumns;
|
139
|
+
}
|
140
|
+
return this.olapState.tdsState.tdsColumns.slice(0, idx);
|
141
|
+
}
|
142
|
+
get referencedTDSColumns() {
|
143
|
+
const operatorReference = this.operationState instanceof QueryBuilderTDSOlapAggreationOperatorState
|
144
|
+
? [this.operationState.columnState]
|
145
|
+
: [];
|
146
|
+
const soryByReference = this.sortByState
|
147
|
+
? [this.sortByState.columnState]
|
148
|
+
: [];
|
149
|
+
return [...this.windowColumns, ...soryByReference, ...operatorReference];
|
150
|
+
}
|
151
|
+
getColumnType() {
|
152
|
+
return this.operationState.operator.getOperatorReturnType(this.olapState.tdsState.queryBuilderState.graphManagerState.graph);
|
153
|
+
}
|
154
|
+
setColumnName(val) {
|
155
|
+
this.columnName = val;
|
156
|
+
}
|
157
|
+
setOperatorState(op) {
|
158
|
+
this.operationState = op;
|
159
|
+
}
|
160
|
+
setSortBy(val) {
|
161
|
+
this.sortByState = val;
|
162
|
+
}
|
163
|
+
changeWindow(val, idx) {
|
164
|
+
this.windowColumns[idx] = val;
|
165
|
+
}
|
166
|
+
addWindow(val) {
|
167
|
+
addUniqueEntry(this.windowColumns, val);
|
168
|
+
}
|
169
|
+
deleteWindow(val) {
|
170
|
+
deleteEntry(this.windowColumns, val);
|
171
|
+
}
|
172
|
+
possibleAggregatedColumns(op) {
|
173
|
+
if (op.isColumnAggregator()) {
|
174
|
+
return this.possibleReferencedColumns.filter((col) => op.isCompatibleWithColumn(col));
|
175
|
+
}
|
176
|
+
return [];
|
177
|
+
}
|
178
|
+
changeOperator(olapOp) {
|
179
|
+
const currentOperator = this.operationState.operator;
|
180
|
+
const currentAggregateColumn = this.operationState instanceof QueryBuilderTDSOlapAggreationOperatorState
|
181
|
+
? this.operationState.columnState
|
182
|
+
: undefined;
|
183
|
+
if (currentOperator !== olapOp) {
|
184
|
+
if (olapOp.isColumnAggregator()) {
|
185
|
+
const compatibleAggCol = currentAggregateColumn &&
|
186
|
+
olapOp.isCompatibleWithColumn(currentAggregateColumn)
|
187
|
+
? currentAggregateColumn
|
188
|
+
: this.possibleAggregatedColumns(olapOp)[0];
|
189
|
+
if (compatibleAggCol) {
|
190
|
+
this.setOperatorState(new QueryBuilderTDSOlapAggreationOperatorState(this.olapState, olapOp, compatibleAggCol));
|
191
|
+
}
|
192
|
+
}
|
193
|
+
else {
|
194
|
+
this.setOperatorState(new QueryBuilderTDSOlapRankOperatorState(this.olapState, olapOp));
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
changeSortBy(sortOp) {
|
199
|
+
const sortByState = this.sortByState;
|
200
|
+
if (sortByState?.sortType !== sortOp) {
|
201
|
+
if (sortOp) {
|
202
|
+
const sortInfoOpState = sortByState ??
|
203
|
+
new OlapGroupByColumnSortByState(guaranteeNonNullable(this.possibleReferencedColumns[0]), sortOp);
|
204
|
+
sortInfoOpState.setSortType(sortOp);
|
205
|
+
this.setSortBy(sortInfoOpState);
|
206
|
+
}
|
207
|
+
else {
|
208
|
+
this.setSortBy(undefined);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
get hashCode() {
|
213
|
+
return hashArray([
|
214
|
+
QUERY_BUILDER_HASH_STRUCTURE.OLAP_GROUPBY_COLUMN_STATE,
|
215
|
+
hashArray(this.windowColumns),
|
216
|
+
this.sortByState ?? '',
|
217
|
+
this.operationState,
|
218
|
+
this.columnName,
|
219
|
+
]);
|
220
|
+
}
|
221
|
+
}
|
222
|
+
export class QueryBuilderOlapGroupByState {
|
223
|
+
tdsState;
|
224
|
+
olapColumns = [];
|
225
|
+
operators;
|
226
|
+
editColumn;
|
227
|
+
constructor(tdsState, operators) {
|
228
|
+
makeObservable(this, {
|
229
|
+
olapColumns: observable,
|
230
|
+
editColumn: observable,
|
231
|
+
addOlapColumn: action,
|
232
|
+
removeColumn: action,
|
233
|
+
moveColumn: action,
|
234
|
+
setEditColumn: action,
|
235
|
+
});
|
236
|
+
this.tdsState = tdsState;
|
237
|
+
this.operators = operators;
|
238
|
+
}
|
239
|
+
get isEmpty() {
|
240
|
+
return !this.olapColumns.length;
|
241
|
+
}
|
242
|
+
get referencedTDSColumns() {
|
243
|
+
return uniq(this.olapColumns.map((c) => c.referencedTDSColumns).flat());
|
244
|
+
}
|
245
|
+
setEditColumn(col) {
|
246
|
+
this.editColumn = col;
|
247
|
+
}
|
248
|
+
findOperator(func) {
|
249
|
+
return this.operators.find((o) => matchFunctionName(func, o.pureFunc));
|
250
|
+
}
|
251
|
+
addOlapColumn(olapGroupByCol) {
|
252
|
+
addUniqueEntry(this.olapColumns, olapGroupByCol);
|
253
|
+
}
|
254
|
+
removeColumn(column) {
|
255
|
+
deleteEntry(this.olapColumns, column);
|
256
|
+
}
|
257
|
+
moveColumn(fromIndex, toIndex) {
|
258
|
+
const fromCol = this.olapColumns[fromIndex];
|
259
|
+
const toCol = this.olapColumns[toIndex];
|
260
|
+
if (fromCol && toCol) {
|
261
|
+
this.olapColumns[fromIndex] = toCol;
|
262
|
+
this.olapColumns[toIndex] = fromCol;
|
263
|
+
}
|
264
|
+
}
|
265
|
+
get hashCode() {
|
266
|
+
return hashArray([
|
267
|
+
QUERY_BUILDER_HASH_STRUCTURE.OLAP_GROUPBY_STATE,
|
268
|
+
hashArray(this.olapColumns),
|
269
|
+
]);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByState.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAa,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,IAAI,GAEL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD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CAAC,cAAkD;QAC9D,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,YAAY,CAAC,MAA0C;QACrD,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,OAAe;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,OAAO,IAAI,KAAK,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;YACpC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;SACrC;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,kBAAkB;YAC/C,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;SAC5B,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { SimpleFunctionExpression } from '@finos/legend-graph';
|
17
|
+
import type { QueryBuilderState } from '../../../QueryBuilderState.js';
|
18
|
+
export declare const processTDSOlapGroupByExpression: (expression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState) => void;
|
19
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByStateBuilder.d.ts.map
|
package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByStateBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAML,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAevE,eAAO,MAAM,+BAA+B,eAC9B,wBAAwB,qBACjB,iBAAiB,KACnC,IAyLF,CAAC"}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { CollectionInstanceValue, LambdaFunction, LambdaFunctionInstanceValue, matchFunctionName, PrimitiveInstanceValue, SimpleFunctionExpression, VariableExpression, } from '@finos/legend-graph';
|
17
|
+
import { assertTrue, assertType, guaranteeIsString, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
|
18
|
+
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
19
|
+
import { QueryBuilderValueSpecificationProcessor } from '../../../QueryBuilderStateBuilder.js';
|
20
|
+
import { getTDSColumnState, getTDSColSortTypeFromFunctionName, } from '../QueryBuilderTDSHelper.js';
|
21
|
+
import { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
22
|
+
import { OlapGroupByColumnSortByState, QueryBuilderOlapGroupByColumnState, QueryBuilderTDSOlapAggreationOperatorState, QueryBuilderTDSOlapRankOperatorState, } from './QueryBuilderOlapGroupByState.js';
|
23
|
+
export const processTDSOlapGroupByExpression = (expression, queryBuilderState) => {
|
24
|
+
// check parameters
|
25
|
+
const parametersLength = expression.parametersValues.length;
|
26
|
+
assertTrue(parametersLength === 4 || parametersLength === 5, `Can't process sort() expression: olapGroupBy() expects 3 or 4 argument`);
|
27
|
+
// expected expressions
|
28
|
+
const containsSortByExpression = parametersLength === 5;
|
29
|
+
const windowColumnsExpression = expression.parametersValues[1];
|
30
|
+
const sortByValueSpec = containsSortByExpression
|
31
|
+
? expression.parametersValues[2]
|
32
|
+
: undefined;
|
33
|
+
const olapOperationExpression = containsSortByExpression
|
34
|
+
? expression.parametersValues[3]
|
35
|
+
: expression.parametersValues[2];
|
36
|
+
const olapColumnExpression = containsSortByExpression
|
37
|
+
? expression.parametersValues[4]
|
38
|
+
: expression.parametersValues[3];
|
39
|
+
// check preceding expression
|
40
|
+
const precedingExpression = guaranteeType(expression.parametersValues[0], SimpleFunctionExpression, `Can't process olapGroupBy() expression: only support olapGroupBy() immediately following an expression`);
|
41
|
+
assertTrue(matchFunctionName(precedingExpression.functionName, [
|
42
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_TAKE,
|
43
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DISTINCT,
|
44
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_SORT,
|
45
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
|
46
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
|
47
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER,
|
48
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_GROUPBY,
|
49
|
+
]), `Can't process olapGroupBy() expression: only support olapGroupBy() in TDS expression`);
|
50
|
+
QueryBuilderValueSpecificationProcessor.process(precedingExpression, queryBuilderState);
|
51
|
+
// process window columns
|
52
|
+
const tdsState = guaranteeType(queryBuilderState.fetchStructureState.implementation, QueryBuilderTDSState);
|
53
|
+
assertType(windowColumnsExpression, CollectionInstanceValue, `Can't process olapGroupBy() expression: olapGroupBy() expects argument #1 to be a collection`);
|
54
|
+
const windowColumns = windowColumnsExpression.values.map((value) => {
|
55
|
+
const columnName = guaranteeIsString(guaranteeType(value, PrimitiveInstanceValue, 'Can`t process OLAP window column expression: Column should be a primitive instance value').values[0], 'Can`t process OLAP window column expression: Column should be a string primitive instance value');
|
56
|
+
return getTDSColumnState(tdsState, columnName);
|
57
|
+
});
|
58
|
+
// process sortBy
|
59
|
+
let sortByState;
|
60
|
+
if (containsSortByExpression) {
|
61
|
+
const sortByExpression = guaranteeType(sortByValueSpec, SimpleFunctionExpression, `Can't process olapGroupBy sortBy expression: only support function expression of 'asc' or 'desc'`);
|
62
|
+
const sortByFunctionName = sortByExpression.functionName;
|
63
|
+
const colSortType = getTDSColSortTypeFromFunctionName(sortByFunctionName);
|
64
|
+
const colSortVal = guaranteeIsString(guaranteeType(sortByExpression.parametersValues[0], PrimitiveInstanceValue, 'Can`t process OLAP sort column : OLAP sort column should be a primitive instance value').values[0], 'Can`t process OLAP sort column: OLAP sort column should be a string primitive instance value');
|
65
|
+
const sortColState = getTDSColumnState(tdsState, colSortVal);
|
66
|
+
sortByState = new OlapGroupByColumnSortByState(sortColState, colSortType);
|
67
|
+
}
|
68
|
+
// process olap operation
|
69
|
+
let operatorState;
|
70
|
+
if (olapOperationExpression instanceof SimpleFunctionExpression) {
|
71
|
+
assertTrue(matchFunctionName(olapOperationExpression.functionName, [
|
72
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FUNC,
|
73
|
+
]), `Can't process olapGroupBy() operation expression: olapGroupBy() aggregation should contain function 'func'`);
|
74
|
+
const olapOperationExpressionParams = olapOperationExpression.parametersValues;
|
75
|
+
const columnName = guaranteeIsString(guaranteeType(olapOperationExpressionParams[0], PrimitiveInstanceValue, 'Can`t process OLAP opperation expression: Function `func` first parameter should be a primitive instance value').values[0], 'Can`t process OLAP opperation expression: Function `func` first parameter should be a string primitive instance value');
|
76
|
+
const oppColumnState = getTDSColumnState(tdsState, columnName);
|
77
|
+
const operationLambda = guaranteeType(guaranteeType(olapOperationExpressionParams[1], LambdaFunctionInstanceValue).values[0], LambdaFunction);
|
78
|
+
assertTrue(operationLambda.expressionSequence.length === 1);
|
79
|
+
const operationFunctionExp = guaranteeType(operationLambda.expressionSequence[0], SimpleFunctionExpression);
|
80
|
+
const operation = guaranteeNonNullable(tdsState.olapGroupByState.findOperator(operationFunctionExp.functionName), `olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`);
|
81
|
+
operatorState = new QueryBuilderTDSOlapAggreationOperatorState(tdsState.olapGroupByState, operation, oppColumnState);
|
82
|
+
operatorState.setLambdaParameterName(guaranteeType(operationLambda.functionType.parameters[0], VariableExpression, `Can't process olapGroupBy() operation lambda: only support olapGroupBy() operation lambda with 1 parameter of type 'VariableExpression'`).name);
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
const operationLambda = guaranteeType(guaranteeType(olapOperationExpression, LambdaFunctionInstanceValue)
|
86
|
+
.values[0], LambdaFunction);
|
87
|
+
assertTrue(operationLambda.expressionSequence.length === 1);
|
88
|
+
const operationFunctionExp = guaranteeType(operationLambda.expressionSequence[0], SimpleFunctionExpression);
|
89
|
+
const operation = guaranteeNonNullable(tdsState.olapGroupByState.findOperator(operationFunctionExp.functionName), `olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`);
|
90
|
+
assertTrue(!operation.isColumnAggregator(), `Operator '${operation.getLabel()}' expects a TDS column to aggregate against`);
|
91
|
+
operatorState = new QueryBuilderTDSOlapRankOperatorState(tdsState.olapGroupByState, operation);
|
92
|
+
operatorState.setLambdaParameterName(guaranteeType(operationLambda.functionType.parameters[0], VariableExpression, `Can't process olapGroupBy() operation lambda: only support olapGroupBy() operation lambda with 1 parameter of type 'VariableExpression'`).name);
|
93
|
+
}
|
94
|
+
// main col
|
95
|
+
const olapColumnValue = guaranteeIsString(guaranteeType(olapColumnExpression, PrimitiveInstanceValue, 'Can`t process OLAP column: OLAP column should be a primitive instance value').values[0], 'Can`t process OLAP column: OLAP column should be a string primitive instance value');
|
96
|
+
const olapGroupByColumnState = new QueryBuilderOlapGroupByColumnState(tdsState.olapGroupByState, windowColumns, sortByState, operatorState, olapColumnValue);
|
97
|
+
tdsState.olapGroupByState.addOlapColumn(olapGroupByColumnState);
|
98
|
+
tdsState.setShowOlapGroupByPanel(true);
|
99
|
+
};
|
100
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByStateBuilder.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByStateBuilder.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iCAAiC,EAAE,MAAM,4DAA4D,CAAC;AAE/G,OAAO,EAAE,uCAAuC,EAAE,MAAM,sC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,aAAa,EACb,eAAe,CAChB,CAAC;IACF,QAAQ,CAAC,gBAAgB,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAChE,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { type LambdaFunction } from '@finos/legend-graph';
|
17
|
+
import { type QueryBuilderOlapGroupByState } from './QueryBuilderOlapGroupByState.js';
|
18
|
+
export declare const appendOlapGroupByState: (olapGroupByState: QueryBuilderOlapGroupByState, lambda: LambdaFunction) => LambdaFunction;
|
19
|
+
//# sourceMappingURL=QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderOlapGroupByValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOlapGroupByValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,cAAc,EAUpB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAEL,KAAK,4BAA4B,EAElC,MAAM,mCAAmC,CAAC;AAuG3C,eAAO,MAAM,sBAAsB,qBACf,4BAA4B,UACtC,cAAc,KACrB,cAKF,CAAC"}
|