@finos/legend-query-builder 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +11 -2
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +23 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js +104 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +0 -9
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +10 -30
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- 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/QueryBuilderSideBar.d.ts +2 -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/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/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +2 -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.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.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- 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.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +8 -9
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +12 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +11 -7
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +1 -15
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +36 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js +50 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.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 +17 -1
- package/lib/index.css.map +1 -1
- package/lib/package.json +8 -8
- 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/QueryBuilderResultState.d.ts +1 -2
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +7 -12
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +9 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +19 -4
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +4 -3
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +50 -42
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +32 -29
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +14 -78
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +4 -20
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -4
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +6 -6
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.d.ts → QueryBuilderOLAPGroupByOperatorLoader.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.js → QueryBuilderOLAPGroupByOperatorLoader.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.d.ts → QueryBuilderOLAPGroupByState.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.js → QueryBuilderOLAPGroupByState.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.d.ts → QueryBuilderOLAPGroupByStateBuilder.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.js → QueryBuilderOLAPGroupByStateBuilder.js} +4 -4
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.js → QueryBuilderOLAPGroupByValueSpecificationBuilder.js} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +5 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +10 -10
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +6 -4
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +27 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +93 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +60 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +70 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +199 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +49 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js +24 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.d.ts → milestoning/QueryBuilderMilestoningState.d.ts} +6 -2
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +20 -20
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +55 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/shared/LambdaParameterState.d.ts +14 -2
- package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
- package/lib/stores/shared/LambdaParameterState.js +79 -6
- package/lib/stores/shared/LambdaParameterState.js.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +58 -2
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js +7 -4
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +15 -15
- package/src/components/QueryBuilder.tsx +38 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +284 -0
- package/src/components/QueryBuilderDiffPanel.tsx +0 -2
- package/src/components/QueryBuilderParametersPanel.tsx +24 -110
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +119 -36
- package/src/components/QueryBuilderSideBar.tsx +5 -22
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +29 -39
- package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.tsx → QueryBuilderOLAPGroupByPanel.tsx} +1 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +18 -19
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +9 -9
- package/src/components/filter/QueryBuilderFilterPanel.tsx +16 -17
- package/src/components/shared/BasicValueSpecificationEditor.tsx +47 -22
- package/src/components/shared/LambdaEditor.tsx +0 -15
- package/src/components/shared/QueryBuilderVariableSelector.tsx +186 -0
- package/src/components/watermark/QueryBuilderWatermark.tsx +19 -31
- package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
- package/src/stores/QueryBuilderConfig.ts +1 -0
- package/src/stores/QueryBuilderConstantsState.ts +173 -0
- package/src/stores/QueryBuilderParametersState.ts +0 -6
- package/src/stores/QueryBuilderPropertyEditorState.ts +6 -235
- package/src/stores/QueryBuilderResultState.ts +19 -17
- package/src/stores/QueryBuilderState.ts +25 -4
- package/src/stores/QueryBuilderStateBuilder.ts +111 -52
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +48 -58
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +16 -105
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +10 -29
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +2 -2
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.ts → QueryBuilderOLAPGroupByOperatorLoader.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.ts → QueryBuilderOLAPGroupByState.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.ts → QueryBuilderOLAPGroupByStateBuilder.ts} +3 -1
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.ts} +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +11 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +10 -5
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +165 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +96 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +311 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +77 -0
- package/src/stores/{QueryBuilderMilestoningState.ts → milestoning/QueryBuilderMilestoningState.ts} +55 -39
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
- package/src/stores/shared/LambdaParameterState.ts +151 -10
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
- package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +3 -0
- package/src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts +11 -5
- package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -1
- package/tsconfig.json +14 -6
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.js.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.js.map +0 -1
package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js}
RENAMED
@@ -13,12 +13,16 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import {
|
17
|
-
import { hashArray } from '@finos/legend-shared';
|
16
|
+
import { GenericType, GenericTypeExplicitReference, getMilestoneTemporalStereotype, MILESTONING_STEREOTYPE, observe_ValueSpecification, VariableExpression, Multiplicity, PrimitiveType, } from '@finos/legend-graph';
|
17
|
+
import { hashArray, guaranteeNonNullable, } from '@finos/legend-shared';
|
18
18
|
import { action, computed, makeObservable, observable } from 'mobx';
|
19
|
-
import { QUERY_BUILDER_HASH_STRUCTURE } from '
|
20
|
-
import { LambdaParameterState } from '
|
19
|
+
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../graphManager/QueryBuilderHashUtils.js';
|
20
|
+
import { LambdaParameterState } from '../shared/LambdaParameterState.js';
|
21
|
+
import { QueryBuilderBitemporalMilestoningImplementation } from './QueryBuilderBitemporalMilestoningImplementation.js';
|
22
|
+
import { QueryBuilderBusinessTemporalMilestoningImplementation } from './QueryBuilderBusinessTemporalMilestoningImplementation.js';
|
23
|
+
import { QueryBuilderProcessingTemporalMilestoningImplementation } from './QueryBuilderProcessingTemporalMilestoningImplementation.js';
|
21
24
|
export class QueryBuilderMilestoningState {
|
25
|
+
milestoningImplementations = [];
|
22
26
|
queryBuilderState;
|
23
27
|
showMilestoningEditor = false;
|
24
28
|
// TODO: Change this when we modify how we deal with milestoning.
|
@@ -34,9 +38,13 @@ export class QueryBuilderMilestoningState {
|
|
34
38
|
setProcessingDate: action,
|
35
39
|
setBusinessDate: action,
|
36
40
|
setShowMilestoningEditor: action,
|
41
|
+
clearMilestoningDates: action,
|
37
42
|
hashCode: computed,
|
38
43
|
});
|
39
44
|
this.queryBuilderState = queryBuilderState;
|
45
|
+
this.milestoningImplementations.push(new QueryBuilderBusinessTemporalMilestoningImplementation(this, MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL));
|
46
|
+
this.milestoningImplementations.push(new QueryBuilderProcessingTemporalMilestoningImplementation(this, MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL));
|
47
|
+
this.milestoningImplementations.push(new QueryBuilderBitemporalMilestoningImplementation(this, MILESTONING_STEREOTYPE.BITEMPORAL));
|
40
48
|
}
|
41
49
|
get isMilestonedQuery() {
|
42
50
|
return Boolean(this.businessDate ?? this.processingDate);
|
@@ -44,23 +52,11 @@ export class QueryBuilderMilestoningState {
|
|
44
52
|
setShowMilestoningEditor(val) {
|
45
53
|
this.showMilestoningEditor = val;
|
46
54
|
}
|
55
|
+
getMilestoningImplementation(stereotype) {
|
56
|
+
return guaranteeNonNullable(this.milestoningImplementations.find((imp) => imp.stereotype === stereotype));
|
57
|
+
}
|
47
58
|
initializeQueryMilestoningParameters(stereotype) {
|
48
|
-
|
49
|
-
case MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL: {
|
50
|
-
this.setBusinessDate(this.buildMilestoningParameter(BUSINESS_DATE_MILESTONING_PROPERTY_NAME));
|
51
|
-
break;
|
52
|
-
}
|
53
|
-
case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL: {
|
54
|
-
this.setProcessingDate(this.buildMilestoningParameter(PROCESSING_DATE_MILESTONING_PROPERTY_NAME));
|
55
|
-
break;
|
56
|
-
}
|
57
|
-
case MILESTONING_STEREOTYPE.BITEMPORAL: {
|
58
|
-
this.setProcessingDate(this.buildMilestoningParameter(PROCESSING_DATE_MILESTONING_PROPERTY_NAME));
|
59
|
-
this.setBusinessDate(this.buildMilestoningParameter(BUSINESS_DATE_MILESTONING_PROPERTY_NAME));
|
60
|
-
break;
|
61
|
-
}
|
62
|
-
default:
|
63
|
-
}
|
59
|
+
this.getMilestoningImplementation(stereotype).initializeMilestoningParameters(true);
|
64
60
|
}
|
65
61
|
setProcessingDate(val) {
|
66
62
|
this.processingDate = val
|
@@ -72,6 +68,10 @@ export class QueryBuilderMilestoningState {
|
|
72
68
|
? observe_ValueSpecification(val, this.queryBuilderState.observableContext)
|
73
69
|
: val;
|
74
70
|
}
|
71
|
+
clearMilestoningDates() {
|
72
|
+
this.setBusinessDate(undefined);
|
73
|
+
this.setProcessingDate(undefined);
|
74
|
+
}
|
75
75
|
updateMilestoningConfiguration() {
|
76
76
|
const currentclass = this.queryBuilderState.class;
|
77
77
|
if (currentclass !== undefined) {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderMilestoningState.js","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderMilestoningState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,4BAA4B,EAC5B,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAElB,YAAY,EACZ,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,SAAS,EACT,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAE3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,+CAA+C,EAAE,MAAM,sDAAsD,CAAC;AACvH,OAAO,EAAE,qDAAqD,EAAE,MAAM,4DAA4D,CAAC;AAEnI,OAAO,EAAE,uDAAuD,EAAE,MAAM,8DAA8D,CAAC;AAEvI,MAAM,OAAO,4BAA4B;IAC9B,0BAA0B,GACjC,EAAE,CAAC;IAEL,iBAAiB,CAAoB;IAErC,qBAAqB,GAAG,KAAK,CAAC;IAC9B,iEAAiE;IACjE,yDAAyD;IACzD,YAAY,CAAkC;IAC9C,cAAc,CAAkC;IAEhD,YAAY,iBAAoC;QAC9C,cAAc,CAAC,IAAI,EAAE;YACnB,cAAc,EAAE,UAAU;YAC1B,YAAY,EAAE,UAAU;YACxB,qBAAqB,EAAE,UAAU;YACjC,iBAAiB,EAAE,QAAQ;YAC3B,iBAAiB,EAAE,MAAM;YACzB,eAAe,EAAE,MAAM;YACvB,wBAAwB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AAiB,CAAC,KAAK,CAC/C,CAAC;YACF,aAAa,CAAC,kBAAkB,EAAE,CAAC;YACnC,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;SACpE;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,iBAAiB;YAC9C,IAAI,CAAC,YAAY,IAAI,EAAE;YACvB,IAAI,CAAC,cAAc,IAAI,EAAE;SAC1B,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -0,0 +1,26 @@
|
|
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 ValueSpecification, type SimpleFunctionExpression, type AbstractPropertyExpression } from '@finos/legend-graph';
|
17
|
+
import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
|
18
|
+
export declare class QueryBuilderProcessingTemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
|
19
|
+
getMilestoningDate(): ValueSpecification | undefined;
|
20
|
+
getMilestoningToolTipText(): string;
|
21
|
+
initializeMilestoningParameters(force?: boolean): void;
|
22
|
+
processGetAllParamaters(parameterValues: ValueSpecification[]): void;
|
23
|
+
buildGetAllParameters(getAllFunction: SimpleFunctionExpression): void;
|
24
|
+
generateMilestoningDate(isDatePropagationSupported: boolean, hasDefaultMilestoningDate: boolean, prevPropertyExpression: AbstractPropertyExpression | undefined): ValueSpecification;
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map
|
package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProcessingTemporalMilestoningImplementation.d.ts","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAEhC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAEnG,qBAAa,uDAAwD,SAAQ,qCAAqC;IAChH,kBAAkB,IAAI,kBAAkB,GAAG,SAAS;IAIpD,yBAAyB,IAAI,MAAM;IAInC,+BAA+B,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;IAUtD,uBAAuB,CAAC,eAAe,EAAE,kBAAkB,EAAE,GAAG,IAAI;IAQpE,qBAAqB,CAAC,cAAc,EAAE,wBAAwB,GAAG,IAAI;IASrE,uBAAuB,CACrB,0BAA0B,EAAE,OAAO,EACnC,yBAAyB,EAAE,OAAO,EAClC,sBAAsB,EAAE,0BAA0B,GAAG,SAAS,GAC7D,kBAAkB;CAoBtB"}
|
@@ -0,0 +1,55 @@
|
|
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 { PROCESSING_DATE_MILESTONING_PROPERTY_NAME, INTERNAL__PropagatedValue, } from '@finos/legend-graph';
|
17
|
+
import { assertTrue, guaranteeNonNullable } from '@finos/legend-shared';
|
18
|
+
import { getParameterValue } from '../../components/QueryBuilderSideBar.js';
|
19
|
+
import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
|
20
|
+
export class QueryBuilderProcessingTemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
|
21
|
+
getMilestoningDate() {
|
22
|
+
return this.milestoningState.processingDate;
|
23
|
+
}
|
24
|
+
getMilestoningToolTipText() {
|
25
|
+
return `Processing Date: ${getParameterValue(this.getMilestoningDate())}`;
|
26
|
+
}
|
27
|
+
initializeMilestoningParameters(force) {
|
28
|
+
if (!this.milestoningState.processingDate || force) {
|
29
|
+
this.milestoningState.setProcessingDate(this.milestoningState.buildMilestoningParameter(PROCESSING_DATE_MILESTONING_PROPERTY_NAME));
|
30
|
+
}
|
31
|
+
}
|
32
|
+
processGetAllParamaters(parameterValues) {
|
33
|
+
assertTrue(parameterValues.length === 2, `Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`);
|
34
|
+
this.milestoningState.setProcessingDate(parameterValues[1]);
|
35
|
+
}
|
36
|
+
buildGetAllParameters(getAllFunction) {
|
37
|
+
getAllFunction.parametersValues.push(guaranteeNonNullable(this.getMilestoningDate(), `Milestoning class should have a parameter of type 'Date'`));
|
38
|
+
}
|
39
|
+
generateMilestoningDate(isDatePropagationSupported, hasDefaultMilestoningDate, prevPropertyExpression) {
|
40
|
+
this.initializeMilestoningParameters();
|
41
|
+
if (isDatePropagationSupported &&
|
42
|
+
prevPropertyExpression &&
|
43
|
+
!hasDefaultMilestoningDate) {
|
44
|
+
return new INTERNAL__PropagatedValue(() => guaranteeNonNullable(prevPropertyExpression.parametersValues[1]));
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
const milestoningDate = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(this.getMilestoningDate()));
|
48
|
+
milestoningDate.isPropagatedValue = hasDefaultMilestoningDate
|
49
|
+
? false
|
50
|
+
: isDatePropagationSupported;
|
51
|
+
return milestoningDate;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
//# sourceMappingURL=QueryBuilderProcessingTemporalMilestoningImplementation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderProcessingTemporalMilestoningImplementation.js","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,yCAAyC,EAGzC,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAEnG,MAAM,OAAO,uDAAwD,SAAQ,qCAAqC;IAChH,kBAAkB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;IAC9C,CAAC;IAED,yBAAyB;QACvB,OAAO,oBAAoB,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,EAAE,CAAC;IAC5E,CAAC;IAED,+BAA+B,CAAC,KAAe;QAC7C,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,IAAI,KAAK,EAAE;YAClD,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CACrC,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,CAC7C,yCAAyC,CAC1C,CACF,CAAC;SACH;IACH,CAAC;IAED,uBAAuB,CAAC,eAAqC;QAC3D,UAAU,CACR,eAAe,CAAC,MAAM,KAAK,CAAC,EAC5B,mGAAmG,CACpG,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,qBAAqB,CAAC,cAAwC;QAC5D,cAAc,CAAC,gBAAgB,CAAC,IAAI,CAClC,oBAAoB,CAClB,IAAI,CAAC,kBAAkB,EAAE,EACzB,0DAA0D,CAC3D,CACF,CAAC;IACJ,CAAC;IAED,uBAAuB,CACrB,0BAAmC,EACnC,yBAAkC,EAClC,sBAA8D;QAE9D,IAAI,CAAC,+BAA+B,EAAE,CAAC;QACvC,IACE,0BAA0B;YAC1B,sBAAsB;YACtB,CAAC,yBAAyB,EAC1B;YACA,OAAO,IAAI,yBAAyB,CAAC,GAAG,EAAE,CACxC,oBAAoB,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CACjE,CAAC;SACH;aAAM;YACL,MAAM,eAAe,GAAG,IAAI,yBAAyB,CAAC,GAAG,EAAE,CACzD,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAChD,CAAC;YACF,eAAe,CAAC,iBAAiB,GAAG,yBAAyB;gBAC3D,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,0BAA0B,CAAC;YAC/B,OAAO,eAAe,CAAC;SACxB;IACH,CAAC;CACF"}
|
@@ -13,12 +13,24 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { type ObserverContext, type Type, type ValueSpecification, type PureModel, VariableExpression } from '@finos/legend-graph';
|
16
|
+
import { type ObserverContext, type Type, type ValueSpecification, type PureModel, type GraphManagerState, type RawLambda, VariableExpression, LambdaFunction, Multiplicity, ParameterValue } from '@finos/legend-graph';
|
17
17
|
import { type Hashable } from '@finos/legend-shared';
|
18
18
|
export declare enum PARAMETER_SUBMIT_ACTION {
|
19
19
|
EXECUTE = "EXECUTE",
|
20
20
|
EXPORT = "EXPORT"
|
21
21
|
}
|
22
|
+
export declare const buildParametersLetLambdaFunc: (graph: PureModel, lambdaParametersStates: LambdaParameterState[]) => LambdaFunction;
|
23
|
+
/**
|
24
|
+
* For most query executions we will use the stragtical method of sending in `paramValues` as part of the execution input payload.
|
25
|
+
* However when the user wants to use a function value as the parameter value, engine does not understand this i.e for date param the functions `now()`, `today()`.
|
26
|
+
* Engine Does not support this because those functions require a building of execution nodes inside the execution plan.
|
27
|
+
* To continue supporting this execution flow , we will add let statements for parameter values with function values so that they can be evaluated to constants in the execution plan.
|
28
|
+
*/
|
29
|
+
export declare const doesLambdaParameterStateContainFunctionValues: (parameterState: LambdaParameterState) => boolean;
|
30
|
+
export declare const getParameterStatesWithFunctionValues: (parameterStates: LambdaParameterState[]) => LambdaParameterState[];
|
31
|
+
export declare const buildExecutionParameterValues: (paramStates: LambdaParameterState[], graphState: GraphManagerState) => ParameterValue[];
|
32
|
+
export declare const getExecutionQueryFromRawLambda: (rawLambda: RawLambda, parameterStates: LambdaParameterState[], graphManagerState: GraphManagerState) => RawLambda;
|
33
|
+
export declare const buildExecutionQueryFromLambdaFunction: (lambdaFunction: LambdaFunction, parameterStates: LambdaParameterState[], graphManagerState: GraphManagerState) => LambdaFunction;
|
22
34
|
export declare class LambdaParameterState implements Hashable {
|
23
35
|
readonly uuid: string;
|
24
36
|
readonly parameter: VariableExpression;
|
@@ -30,7 +42,7 @@ export declare class LambdaParameterState implements Hashable {
|
|
30
42
|
mockParameterValue(): void;
|
31
43
|
setValue(value: ValueSpecification | undefined): void;
|
32
44
|
changeVariableType(type: Type): void;
|
33
|
-
changeMultiplicity(variableExpression: VariableExpression,
|
45
|
+
changeMultiplicity(variableExpression: VariableExpression, mul: Multiplicity): void;
|
34
46
|
get variableName(): string;
|
35
47
|
get variableType(): Type | undefined;
|
36
48
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LambdaParameterState.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/LambdaParameterState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAKd,kBAAkB,
|
1
|
+
{"version":3,"file":"LambdaParameterState.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/LambdaParameterState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAKd,kBAAkB,EAGlB,cAAc,EAId,YAAY,EAKZ,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,KAAK,QAAQ,EAMd,MAAM,sBAAsB,CAAC;AAQ9B,oBAAY,uBAAuB;IACjC,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAOD,eAAO,MAAM,4BAA4B,UAChC,SAAS,0BACQ,oBAAoB,EAAE,KAC7C,cA6BF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6CAA6C,mBACxC,oBAAoB,KACnC,OAIA,CAAC;AAEJ,eAAO,MAAM,oCAAoC,oBAC9B,oBAAoB,EAAE,KACtC,oBAAoB,EACgD,CAAC;AAExE,eAAO,MAAM,6BAA6B,gBAC3B,oBAAoB,EAAE,cACvB,iBAAiB,KAC5B,cAAc,EAUX,CAAC;AAEP,eAAO,MAAM,8BAA8B,cAC9B,SAAS,mBACH,oBAAoB,EAAE,qBACpB,iBAAiB,KACnC,SA0BF,CAAC;AAEF,eAAO,MAAM,qCAAqC,mBAChC,cAAc,mBACb,oBAAoB,EAAE,qBACpB,iBAAiB,KACnC,cAwBF,CAAC;AAEF,qBAAa,oBAAqB,YA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C;;IAQtE,IAAI,QAAQ,IAAI,MAAM,CAKrB;IAED,YAAY,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI;IAI7C,eAAe,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI;IAIhD,aAAa,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,IAAI;CAGjD"}
|
@@ -13,8 +13,8 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { GenericType, GenericTypeExplicitReference, observe_ValueSpecification, observe_VariableExpression, VariableExpression, } from '@finos/legend-graph';
|
17
|
-
import { addUniqueEntry, deleteEntry, hashArray, IllegalStateError, uuid, } from '@finos/legend-shared';
|
16
|
+
import { GenericType, GenericTypeExplicitReference, observe_ValueSpecification, observe_VariableExpression, VariableExpression, SimpleFunctionExpression, PackageableElementExplicitReference, LambdaFunction, FunctionType, CORE_PURE_PATH, extractElementNameFromPath, Multiplicity, PrimitiveInstanceValue, PrimitiveType, SUPPORTED_FUNCTIONS, areMultiplicitiesEqual, ParameterValue, buildRawLambdaFromLambdaFunction, } from '@finos/legend-graph';
|
17
|
+
import { addUniqueEntry, deleteEntry, hashArray, IllegalStateError, uuid, isNonNullable, guaranteeNonNullable, } from '@finos/legend-shared';
|
18
18
|
import { makeObservable, observable, action, computed } from 'mobx';
|
19
19
|
import { generateVariableExpressionMockValue } from './ValueSpecificationEditorHelper.js';
|
20
20
|
import { valueSpecification_setGenericType, valueSpecification_setMultiplicity, } from './ValueSpecificationModifierHelper.js';
|
@@ -28,6 +28,80 @@ var LAMABA_PARAMETER_HASH_STRUCTURE;
|
|
28
28
|
LAMABA_PARAMETER_HASH_STRUCTURE["LAMBDA_PARAMETER_STATE"] = "LAMBDA_PARAMETER_STATE";
|
29
29
|
LAMABA_PARAMETER_HASH_STRUCTURE["LAMBDA_PARAMETERS_STATE"] = "LAMBDA_PARAMETERS_STATE";
|
30
30
|
})(LAMABA_PARAMETER_HASH_STRUCTURE || (LAMABA_PARAMETER_HASH_STRUCTURE = {}));
|
31
|
+
export const buildParametersLetLambdaFunc = (graph, lambdaParametersStates) => {
|
32
|
+
const letlambdaFunction = new LambdaFunction(new FunctionType(PackageableElementExplicitReference.create(graph.getType(CORE_PURE_PATH.ANY)), Multiplicity.ONE));
|
33
|
+
letlambdaFunction.expressionSequence = lambdaParametersStates
|
34
|
+
.map((queryParamState) => {
|
35
|
+
if (queryParamState.value) {
|
36
|
+
const letFunc = new SimpleFunctionExpression(extractElementNameFromPath(SUPPORTED_FUNCTIONS.LET));
|
37
|
+
const letVar = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(PrimitiveType.STRING)));
|
38
|
+
letVar.values = [queryParamState.variableName];
|
39
|
+
letFunc.parametersValues.push(letVar);
|
40
|
+
letFunc.parametersValues.push(queryParamState.value);
|
41
|
+
return letFunc;
|
42
|
+
}
|
43
|
+
return undefined;
|
44
|
+
})
|
45
|
+
.filter(isNonNullable);
|
46
|
+
return letlambdaFunction;
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* For most query executions we will use the stragtical method of sending in `paramValues` as part of the execution input payload.
|
50
|
+
* However when the user wants to use a function value as the parameter value, engine does not understand this i.e for date param the functions `now()`, `today()`.
|
51
|
+
* Engine Does not support this because those functions require a building of execution nodes inside the execution plan.
|
52
|
+
* To continue supporting this execution flow , we will add let statements for parameter values with function values so that they can be evaluated to constants in the execution plan.
|
53
|
+
*/
|
54
|
+
export const doesLambdaParameterStateContainFunctionValues = (parameterState) => parameterState.value instanceof SimpleFunctionExpression &&
|
55
|
+
[Multiplicity.ONE, Multiplicity.ZERO_ONE].some((p) => areMultiplicitiesEqual(p, parameterState.parameter.multiplicity));
|
56
|
+
export const getParameterStatesWithFunctionValues = (parameterStates) => parameterStates.filter(doesLambdaParameterStateContainFunctionValues);
|
57
|
+
export const buildExecutionParameterValues = (paramStates, graphState) => paramStates
|
58
|
+
.filter((ps) => !doesLambdaParameterStateContainFunctionValues(ps))
|
59
|
+
.map((queryParamState) => {
|
60
|
+
const paramValue = new ParameterValue();
|
61
|
+
paramValue.name = queryParamState.parameter.name;
|
62
|
+
paramValue.value = graphState.graphManager.serializeValueSpecification(guaranteeNonNullable(queryParamState.value));
|
63
|
+
return paramValue;
|
64
|
+
});
|
65
|
+
export const getExecutionQueryFromRawLambda = (rawLambda, parameterStates, graphManagerState) => {
|
66
|
+
const paramsWithLetStatements = getParameterStatesWithFunctionValues(parameterStates);
|
67
|
+
if (paramsWithLetStatements.length > 0) {
|
68
|
+
const execuLambdaFunction = buildParametersLetLambdaFunc(graphManagerState.graph, paramsWithLetStatements);
|
69
|
+
// remove parameters added as let statements from lambda parameters
|
70
|
+
execuLambdaFunction.functionType.parameters = parameterStates
|
71
|
+
.filter((ps) => !paramsWithLetStatements.includes(ps))
|
72
|
+
.map((e) => e.parameter);
|
73
|
+
const execQuery = buildRawLambdaFromLambdaFunction(execuLambdaFunction, graphManagerState);
|
74
|
+
// reset paramaters
|
75
|
+
if (Array.isArray(rawLambda.body) && Array.isArray(execQuery.body)) {
|
76
|
+
execQuery.body = [
|
77
|
+
...execQuery.body,
|
78
|
+
...rawLambda.body,
|
79
|
+
];
|
80
|
+
return execQuery;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
return rawLambda;
|
84
|
+
};
|
85
|
+
export const buildExecutionQueryFromLambdaFunction = (lambdaFunction, parameterStates, graphManagerState) => {
|
86
|
+
const funcParameterStates = getParameterStatesWithFunctionValues(parameterStates);
|
87
|
+
if (funcParameterStates.length) {
|
88
|
+
// To handle parameter value with function calls we
|
89
|
+
// 1. remove those parameters from parameter list
|
90
|
+
// 2. add let statements with parameter values
|
91
|
+
lambdaFunction.functionType.parameters = parameterStates
|
92
|
+
.filter((ps) => !funcParameterStates.includes(ps))
|
93
|
+
.map((e) => e.parameter);
|
94
|
+
const letsFuncs = buildParametersLetLambdaFunc(graphManagerState.graph, funcParameterStates);
|
95
|
+
lambdaFunction.expressionSequence = [
|
96
|
+
...letsFuncs.expressionSequence,
|
97
|
+
...lambdaFunction.expressionSequence,
|
98
|
+
];
|
99
|
+
}
|
100
|
+
else {
|
101
|
+
lambdaFunction.functionType.parameters = parameterStates.map((e) => e.parameter);
|
102
|
+
}
|
103
|
+
return lambdaFunction;
|
104
|
+
};
|
31
105
|
export class LambdaParameterState {
|
32
106
|
uuid = uuid();
|
33
107
|
parameter;
|
@@ -68,11 +142,10 @@ export class LambdaParameterState {
|
|
68
142
|
this.mockParameterValue();
|
69
143
|
}
|
70
144
|
}
|
71
|
-
changeMultiplicity(variableExpression,
|
145
|
+
changeMultiplicity(variableExpression, mul) {
|
72
146
|
const current = this.parameter.multiplicity;
|
73
|
-
if (current
|
74
|
-
|
75
|
-
valueSpecification_setMultiplicity(variableExpression, this.graph.getMultiplicity(lowerBound, uppderBound));
|
147
|
+
if (!areMultiplicitiesEqual(current, mul)) {
|
148
|
+
valueSpecification_setMultiplicity(variableExpression, mul);
|
76
149
|
this.mockParameterValue();
|
77
150
|
}
|
78
151
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LambdaParameterState.js","sourceRoot":"","sources":["../../../src/stores/shared/LambdaParameterState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"LambdaParameterState.js","sourceRoot":"","sources":["../../../src/stores/shared/LambdaParameterState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,WAAW,EACX,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,mCAAmC,EACnC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,0BAA0B,EAC1B,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,gCAAgC,GACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,WAAW,EAEX,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,EAAE,MAAM;YACZ,eAAe,EAAE,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAED,YAAY,CAAC,GAAY;QACvB,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACvB,CAAC;IAED,eAAe,CACb,GAKa;QAEb,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,OAA4B,EAAE,KAAa;QAC9C,IAAI,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,OAAgB,qBAAqB;IACzC,eAAe,GAA2B,EAAE,CAAC;IAC7C,0BAA0B,GAAG,IAAI,kCAAkC,EAAE,CAAC;IAEtE;QACE,cAAc,CAAC,IAAI,EAAE;YACnB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,+BAA+B,CAAC,uBAAuB;YACvD,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC;SAChC,CAAC,CAAC;IACL,CAAC;IAED,YAAY,CAAC,GAAyB;QACpC,cAAc,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,eAAe,CAAC,GAAyB;QACvC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,aAAa,CAAC,GAA2B;QACvC,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;IAC7B,CAAC;CACF"}
|
@@ -13,8 +13,10 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { type PureModel, type InstanceValue, type
|
16
|
+
import { type PureModel, type InstanceValue, VariableExpression, type ValueSpecification, type Type, Enumeration, PrimitiveInstanceValue, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
17
17
|
export declare const createMockEnumerationProperty: (enumeration: Enumeration) => string;
|
18
18
|
export declare const buildPrimitiveInstanceValue: (graph: PureModel, type: PRIMITIVE_TYPE, value: unknown) => PrimitiveInstanceValue;
|
19
|
+
export declare const buildDefaultInstanceValue: (graph: PureModel, type: Type) => ValueSpecification;
|
19
20
|
export declare const generateVariableExpressionMockValue: (parameter: VariableExpression, graph: PureModel) => InstanceValue | undefined;
|
21
|
+
export declare const getValueSpecificationStringValue: (valueSpecification: ValueSpecification) => string | undefined;
|
20
22
|
//# sourceMappingURL=ValueSpecificationEditorHelper.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ValueSpecificationEditorHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationEditorHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,
|
1
|
+
{"version":3,"file":"ValueSpecificationEditorHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationEditorHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,IAAI,EAKT,WAAW,EAMX,sBAAsB,EAEtB,cAAc,EAGf,MAAM,qBAAqB,CAAC;AAiD7B,eAAO,MAAM,6BAA6B,gBAC3B,WAAW,KACvB,MACyE,CAAC;AAE7E,eAAO,MAAM,2BAA2B,UAC/B,SAAS,QACV,cAAc,SACb,OAAO,KACb,sBAQF,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC7B,SAAS,QACV,IAAI,KACT,kBA4CF,CAAC;AAEF,eAAO,MAAM,mCAAmC,cACnC,kBAAkB,SACtB,SAAS,KACf,aAAa,GAAG,SAqClB,CAAC;AAEF,eAAO,MAAM,gCAAgC,uBACvB,kBAAkB,KACrC,MAAM,GAAG,SAkBX,CAAC"}
|
@@ -13,8 +13,9 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { CollectionInstanceValue, DATE_FORMAT, DATE_TIME_FORMAT, Enumeration, EnumValueExplicitReference, EnumValueInstanceValue, GenericType, GenericTypeExplicitReference, getEnumValue, PrimitiveInstanceValue, PrimitiveType, PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
17
|
-
import { addDays, formatDate, Randomizer } from '@finos/legend-shared';
|
16
|
+
import { VariableExpression, CollectionInstanceValue, DATE_FORMAT, DATE_TIME_FORMAT, Enumeration, EnumValueExplicitReference, EnumValueInstanceValue, GenericType, GenericTypeExplicitReference, getEnumValue, PrimitiveInstanceValue, PrimitiveType, PRIMITIVE_TYPE, INTERNAL__PropagatedValue, SimpleFunctionExpression, } from '@finos/legend-graph';
|
17
|
+
import { addDays, formatDate, Randomizer, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
|
+
import { generateDefaultValueForPrimitiveType } from '../QueryBuilderValueSpecificationHelper.js';
|
18
19
|
import { instanceValue_setValues } from './ValueSpecificationModifierHelper.js';
|
19
20
|
const createMockPrimitiveProperty = (primitiveType, propertyName) => {
|
20
21
|
const randomizer = new Randomizer();
|
@@ -45,6 +46,37 @@ export const buildPrimitiveInstanceValue = (graph, type, value) => {
|
|
45
46
|
instanceValue_setValues(instance, [value]);
|
46
47
|
return instance;
|
47
48
|
};
|
49
|
+
export const buildDefaultInstanceValue = (graph, type) => {
|
50
|
+
const path = type.path;
|
51
|
+
switch (path) {
|
52
|
+
case PRIMITIVE_TYPE.STRING:
|
53
|
+
case PRIMITIVE_TYPE.BOOLEAN:
|
54
|
+
case PRIMITIVE_TYPE.STRICTDATE:
|
55
|
+
case PRIMITIVE_TYPE.DATETIME:
|
56
|
+
case PRIMITIVE_TYPE.NUMBER:
|
57
|
+
case PRIMITIVE_TYPE.DECIMAL:
|
58
|
+
case PRIMITIVE_TYPE.FLOAT:
|
59
|
+
case PRIMITIVE_TYPE.BINARY:
|
60
|
+
case PRIMITIVE_TYPE.INTEGER: {
|
61
|
+
return buildPrimitiveInstanceValue(graph, path, generateDefaultValueForPrimitiveType(path));
|
62
|
+
}
|
63
|
+
case PRIMITIVE_TYPE.DATE: {
|
64
|
+
return buildPrimitiveInstanceValue(graph, PRIMITIVE_TYPE.STRICTDATE, generateDefaultValueForPrimitiveType(path));
|
65
|
+
}
|
66
|
+
default:
|
67
|
+
if (type instanceof Enumeration) {
|
68
|
+
if (type.values.length > 0) {
|
69
|
+
const enumValueInstanceValue = new EnumValueInstanceValue(GenericTypeExplicitReference.create(new GenericType(type)));
|
70
|
+
instanceValue_setValues(enumValueInstanceValue, [
|
71
|
+
EnumValueExplicitReference.create(type.values[0]),
|
72
|
+
]);
|
73
|
+
return enumValueInstanceValue;
|
74
|
+
}
|
75
|
+
throw new UnsupportedOperationError(`Can't get default value for enumeration since enumeration '${path}' has no value`);
|
76
|
+
}
|
77
|
+
throw new UnsupportedOperationError(`Can't get default value for type'${path}'`);
|
78
|
+
}
|
79
|
+
};
|
48
80
|
export const generateVariableExpressionMockValue = (parameter, graph) => {
|
49
81
|
const varType = parameter.genericType?.value.rawType;
|
50
82
|
const multiplicity = parameter.multiplicity;
|
@@ -72,4 +104,28 @@ export const generateVariableExpressionMockValue = (parameter, graph) => {
|
|
72
104
|
}
|
73
105
|
return undefined;
|
74
106
|
};
|
107
|
+
export const getValueSpecificationStringValue = (valueSpecification) => {
|
108
|
+
if (valueSpecification instanceof PrimitiveInstanceValue) {
|
109
|
+
return valueSpecification.values[0]?.toString();
|
110
|
+
}
|
111
|
+
else if (valueSpecification instanceof EnumValueInstanceValue) {
|
112
|
+
const _enum = valueSpecification.values[0];
|
113
|
+
return `${_enum?.ownerReference.value.name}.${_enum?.value.name}`;
|
114
|
+
}
|
115
|
+
else if (valueSpecification instanceof VariableExpression) {
|
116
|
+
return valueSpecification.name;
|
117
|
+
}
|
118
|
+
else if (valueSpecification instanceof INTERNAL__PropagatedValue) {
|
119
|
+
return getValueSpecificationStringValue(valueSpecification.getValue());
|
120
|
+
}
|
121
|
+
else if (valueSpecification instanceof SimpleFunctionExpression) {
|
122
|
+
return valueSpecification.functionName;
|
123
|
+
}
|
124
|
+
else if (valueSpecification instanceof CollectionInstanceValue) {
|
125
|
+
return valueSpecification.values
|
126
|
+
.map(getValueSpecificationStringValue)
|
127
|
+
.join(',');
|
128
|
+
}
|
129
|
+
return undefined;
|
130
|
+
};
|
75
131
|
//# sourceMappingURL=ValueSpecificationEditorHelper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ValueSpecificationEditorHelper.js","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationEditorHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"ValueSpecificationEditorHelper.js","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationEditorHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,kBAAkB,EAIlB,uBAAuB,EACvB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACX,4BAA4B,EAC5B,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCA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,CAAC,QAAQ,EAAE,CAAC,CAAC;KACxE;SAAM,IAAI,kBAAkB,YAAY,wBAAwB,EAAE;QACjE,OAAO,kBAAkB,CAAC,YAAY,CAAC;KACxC;SAAM,IAAI,kBAAkB,YAAY,uBAAuB,EAAE;QAChE,OAAO,kBAAkB,CAAC,MAAM;aAC7B,GAAG,CAAC,gCAAgC,CAAC;aACrC,IAAI,CAAC,GAAG,CAAC,CAAC;KACd;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { SimpleFunctionExpression } from '@finos/legend-graph';
|
16
|
+
import { type LambdaFunction, SimpleFunctionExpression } from '@finos/legend-graph';
|
17
17
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
18
|
-
export declare const processWatermarkExpression: (expression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState) => void;
|
18
|
+
export declare const processWatermarkExpression: (expression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState, parentLambda: LambdaFunction) => void;
|
19
19
|
//# sourceMappingURL=QueryBuilderWatermarkStateBuilder.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,eAAO,MAAM,0BAA0B,eACzB,wBAAwB,qBACjB,iBAAiB,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,cAAc,EACnB,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,eAAO,MAAM,0BAA0B,eACzB,wBAAwB,qBACjB,iBAAiB,gBACtB,cAAc,KAC3B,IAsBF,CAAC"}
|
@@ -17,13 +17,13 @@ import { SimpleFunctionExpression, matchFunctionName, } from '@finos/legend-grap
|
|
17
17
|
import { assertTrue, guaranteeType } from '@finos/legend-shared';
|
18
18
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graphManager/QueryBuilderSupportedFunctions.js';
|
19
19
|
import { QueryBuilderValueSpecificationProcessor } from '../QueryBuilderStateBuilder.js';
|
20
|
-
export const processWatermarkExpression = (expression, queryBuilderState) => {
|
20
|
+
export const processWatermarkExpression = (expression, queryBuilderState, parentLambda) => {
|
21
21
|
// check preceding expression
|
22
22
|
const precedingExpression = guaranteeType(expression.parametersValues[0], SimpleFunctionExpression, `Can't process forWatermark() expression: only support forWatermark() immediately following an expression`);
|
23
23
|
assertTrue(matchFunctionName(precedingExpression.functionName, [
|
24
24
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL,
|
25
25
|
]), `Can't process forWatermark() expression: only support forWatermark() immediately following getAll()`);
|
26
|
-
QueryBuilderValueSpecificationProcessor.process(precedingExpression, queryBuilderState);
|
26
|
+
QueryBuilderValueSpecificationProcessor.process(precedingExpression, parentLambda, queryBuilderState);
|
27
27
|
const watermarkValue = expression.parametersValues[1];
|
28
28
|
queryBuilderState.watermarkState.setValue(watermarkValue);
|
29
29
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sDAAsD,CAAC;AAEzG,OAAO,EAAE,uCAAuC,EAAE,MAAM,gCAAgC,CAAC;AAEzF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,UAAoC,EACpC,iBAAoC,EACpC,YAA4B,EACtB,EAAE;IACR,6BAA6B;IAC7B,MAAM,mBAAmB,GAAG,aAAa,CACvC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAC9B,wBAAwB,EACxB,0GAA0G,CAC3G,CAAC;IACF,UAAU,CACR,iBAAiB,CAAC,mBAAmB,CAAC,YAAY,EAAE;QAClD,iCAAiC,CAAC,OAAO;KAC1C,CAAC,EACF,qGAAqG,CACtG,CAAC;IAEF,uCAAuC,CAAC,OAAO,CAC7C,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,CAClB,CAAC;IAEF,MAAM,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACtD,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC5D,CAAC,CAAC"}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import {
|
16
|
+
import { type LambdaFunction } from '@finos/legend-graph';
|
17
17
|
import type { QueryBuilderWatermarkState } from './QueryBuilderWatermarkState.js';
|
18
|
-
export declare const buildWatermarkExpression: (watermarkState: QueryBuilderWatermarkState,
|
18
|
+
export declare const buildWatermarkExpression: (watermarkState: QueryBuilderWatermarkState, lambdaFunction: LambdaFunction) => void;
|
19
19
|
//# sourceMappingURL=QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,eAAO,MAAM,wBAAwB,mBACnB,0BAA0B,kBAC1B,cAAc,KAC7B,IAqBF,CAAC"}
|
@@ -14,17 +14,20 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { SimpleFunctionExpression, extractElementNameFromPath, } from '@finos/legend-graph';
|
17
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
17
18
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graphManager/QueryBuilderSupportedFunctions.js';
|
18
|
-
export const buildWatermarkExpression = (watermarkState,
|
19
|
+
export const buildWatermarkExpression = (watermarkState, lambdaFunction) => {
|
19
20
|
if (!watermarkState.value) {
|
20
|
-
return
|
21
|
+
return;
|
21
22
|
}
|
23
|
+
const currentExpression = guaranteeNonNullable(lambdaFunction.expressionSequence[0]);
|
22
24
|
// main filter expression
|
23
25
|
const watermarkExpression = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.WATERMARK));
|
24
26
|
// param [0]
|
25
|
-
watermarkExpression.parametersValues.push(
|
27
|
+
watermarkExpression.parametersValues.push(currentExpression);
|
26
28
|
// param [1]
|
27
29
|
watermarkExpression.parametersValues.push(watermarkState.value);
|
28
|
-
|
30
|
+
// replace watermark as main expression
|
31
|
+
lambdaFunction.expressionSequence[0] = watermarkExpression;
|
29
32
|
};
|
30
33
|
//# sourceMappingURL=QueryBuilderWatermarkValueSpecificationBuilder.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,0BAA0B,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,0BAA0B,GAE3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,sDAAsD,CAAC;AAGzG,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,cAA0C,EAC1C,cAA8B,EACxB,EAAE;IACR,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE;QACzB,OAAO;KACR;IACD,MAAM,iBAAiB,GAAG,oBAAoB,CAC5C,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACrC,CAAC;IAEF,yBAAyB;IACzB,MAAM,mBAAmB,GAAG,IAAI,wBAAwB,CACtD,0BAA0B,CAAC,iCAAiC,CAAC,SAAS,CAAC,CACxE,CAAC;IAEF,YAAY;IACZ,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAE7D,YAAY;IACZ,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAEhE,uCAAuC;IACvC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC;AAC7D,CAAC,CAAC"}
|
@@ -86,7 +86,7 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
86
86
|
*/
|
87
87
|
propagateExecutionContextChange(executionContext) {
|
88
88
|
const mapping = executionContext.mapping;
|
89
|
-
this.changeMapping(mapping);
|
89
|
+
this.changeMapping(mapping, { keepQueryContent: true });
|
90
90
|
this.changeRuntime(executionContext.runtimeValue);
|
91
91
|
const compatibleClasses = getMappingCompatibleClasses(mapping, this.graphManagerState.usableClasses);
|
92
92
|
// if there is no chosen class or the chosen one is not compatible
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,mDAAmD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAQ5D,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB;IACpD,OAAO,CAAU;IACjB,cAAc,CAAwB;IACtC,iBAAiB,GAA8B,EAAE,CAAC;IAClD,eAAe,CAAwC;IACvD,wBAAwB,CAEnB;IAEL,oCAAoC,GAAG,GAAoB,EAAE,CACpE,0CAA0C,CAAC,IAAI,CAA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BAAiB,CACzB,uGAAuG,mBAAmB,aAAa,CACxI,CAAC;iBACH;gBACD,wBAAwB,GAAG,wBAAwB,CAAC;aACrD;iBAAM;gBACL,UAAU,CACR,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EACjC,gGAAgG,CACjG,CAAC;gBACF,wBAAwB,GAAG,oBAAoB,CAC7C,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAC1B,CAAC;aACH;YAED,IAAI,CAAC,2BAA2B,CAAC,wBAAwB,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,GAAG,wBAAwB,CAAC,OAAO,CAAC;YAChD,IAAI,CAAC,YAAY,GAAG,wBAAwB,CAAC,YAAY,CAAC;SAC3D;IACH,CAAC;IAED,2BAA2B,CAAC,GAA4B;QACtD,IAAI,CAAC,wBAAwB,GAAG,GAAG,CAAC;IACtC,CAAC;IAED,IAAa,gBAAgB;QAC3B,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM;YAClC,CAAC,CAAC,uDAAuD;YACzD,CAAC,CAAC,+BAA+B,CAAC;IACtC,CAAC;IAED,IAAa,iBAAiB;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAa,iBAAiB;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACH,+BAA+B,CAC7B,gBAAyC;QAEzC,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;QACzC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,GAClB,MA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