@finos/legend-query-builder 4.11.17 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  2. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +19 -33
  3. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  4. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  5. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +28 -2
  6. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  7. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  8. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +1 -1
  9. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  10. package/lib/graph/QueryBuilderMetaModelConst.d.ts +7 -3
  11. package/lib/graph/QueryBuilderMetaModelConst.d.ts.map +1 -1
  12. package/lib/graph/QueryBuilderMetaModelConst.js +8 -2
  13. package/lib/graph/QueryBuilderMetaModelConst.js.map +1 -1
  14. package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
  15. package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +9 -3
  16. package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
  17. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +2 -0
  18. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
  19. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +20 -0
  20. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
  21. package/lib/index.css +2 -2
  22. package/lib/index.css.map +1 -1
  23. package/lib/package.json +1 -1
  24. package/lib/stores/QueryBuilderState.d.ts +6 -1
  25. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  26. package/lib/stores/QueryBuilderState.js +15 -5
  27. package/lib/stores/QueryBuilderState.js.map +1 -1
  28. package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
  29. package/lib/stores/QueryBuilderStateBuilder.js +50 -5
  30. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  31. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts +1 -0
  32. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
  33. package/lib/stores/QueryBuilderValueSpecificationBuilder.js +49 -12
  34. package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
  35. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
  36. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -2
  37. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
  38. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +2 -0
  39. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
  40. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +6 -0
  41. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
  42. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
  43. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +4 -2
  44. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
  45. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +1 -0
  46. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
  47. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +30 -4
  48. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  49. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  50. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +16 -0
  51. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  52. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +1 -0
  53. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -1
  54. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +4 -1
  55. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -1
  56. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +1 -0
  57. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -1
  58. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +10 -1
  59. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -1
  60. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -1
  61. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +5 -0
  62. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -1
  63. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +4 -0
  64. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -1
  65. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -1
  66. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts +15 -0
  67. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -1
  68. package/lib/stores/milestoning/QueryBuilderMilestoningState.js +191 -3
  69. package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
  70. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +1 -0
  71. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -1
  72. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +10 -1
  73. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -1
  74. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
  75. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +4 -2
  76. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
  77. package/package.json +5 -5
  78. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +106 -35
  79. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +84 -0
  80. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +13 -0
  81. package/src/graph/QueryBuilderMetaModelConst.ts +9 -2
  82. package/src/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +30 -1
  83. package/src/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +65 -0
  84. package/src/stores/QueryBuilderState.ts +25 -6
  85. package/src/stores/QueryBuilderStateBuilder.ts +124 -5
  86. package/src/stores/QueryBuilderValueSpecificationBuilder.ts +76 -12
  87. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +4 -1
  88. package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +7 -0
  89. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -2
  90. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +68 -1
  91. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +27 -0
  92. package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +9 -0
  93. package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +22 -1
  94. package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +7 -0
  95. package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +7 -0
  96. package/src/stores/milestoning/QueryBuilderMilestoningState.ts +279 -1
  97. package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +22 -1
  98. package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +4 -2
@@ -24,11 +24,16 @@ import {
24
24
  type ValueSpecification,
25
25
  Multiplicity,
26
26
  PrimitiveType,
27
+ INTERNAL__PropagatedValue,
28
+ MILESTONING_START_DATE_PARAMETER_NAME,
29
+ MILESTONING_END_DATE_PARAMETER_NAME,
30
+ PrimitiveInstanceValue,
27
31
  } from '@finos/legend-graph';
28
32
  import {
29
33
  type Hashable,
30
34
  hashArray,
31
35
  guaranteeNonNullable,
36
+ guaranteeType,
32
37
  } from '@finos/legend-shared';
33
38
  import { action, computed, makeObservable, observable } from 'mobx';
34
39
  import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../QueryBuilderStateHashUtils.js';
@@ -39,6 +44,14 @@ import { QueryBuilderBitemporalMilestoningImplementation } from './QueryBuilderB
39
44
  import { QueryBuilderBusinessTemporalMilestoningImplementation } from './QueryBuilderBusinessTemporalMilestoningImplementation.js';
40
45
  import type { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
41
46
  import { QueryBuilderProcessingTemporalMilestoningImplementation } from './QueryBuilderProcessingTemporalMilestoningImplementation.js';
47
+ import { QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS } from '../../graph/QueryBuilderMetaModelConst.js';
48
+ import { QueryBuilderTDSState } from '../fetch-structure/tds/QueryBuilderTDSState.js';
49
+ import { QueryBuilderSimpleProjectionColumnState } from '../fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
50
+ import { QueryBuilderAggregateColumnState } from '../fetch-structure/tds/aggregation/QueryBuilderAggregationState.js';
51
+ import {
52
+ QueryBuilderFilterTreeConditionNodeData,
53
+ QueryBuilderFilterTreeExistsNodeData,
54
+ } from '../filter/QueryBuilderFilterState.js';
42
55
 
43
56
  export class QueryBuilderMilestoningState implements Hashable {
44
57
  readonly milestoningImplementations: QueryBuilderMilestoningImplementation[] =
@@ -52,16 +65,28 @@ export class QueryBuilderMilestoningState implements Hashable {
52
65
  businessDate?: ValueSpecification | undefined;
53
66
  processingDate?: ValueSpecification | undefined;
54
67
 
68
+ startDate?: ValueSpecification | undefined;
69
+ endDate?: ValueSpecification | undefined;
70
+
55
71
  constructor(queryBuilderState: QueryBuilderState) {
56
72
  makeObservable(this, {
57
73
  processingDate: observable,
58
74
  businessDate: observable,
75
+ startDate: observable,
76
+ endDate: observable,
59
77
  showMilestoningEditor: observable,
60
78
  isMilestonedQuery: computed,
61
79
  setProcessingDate: action,
62
80
  setBusinessDate: action,
81
+ setStartDate: action,
82
+ setEndDate: action,
63
83
  setShowMilestoningEditor: action,
64
84
  clearMilestoningDates: action,
85
+ setAllVersions: action,
86
+ setAllVersionsInRange: action,
87
+ initializeAllVersionsInRangeParameters: action,
88
+ clearAllVersionsInRangeParameters: action,
89
+ clearGetAllParameters: action,
65
90
  hashCode: computed,
66
91
  });
67
92
 
@@ -86,8 +111,175 @@ export class QueryBuilderMilestoningState implements Hashable {
86
111
  );
87
112
  }
88
113
 
114
+ // Updates the current queryBuilderState when `allVersions` is selected.
115
+ // When `allVersions` is selected date propagation cannot be done from root class
116
+ // to immediate project/filter properties, so setting date propagation to false
117
+ // to those properties
118
+ updateQueryBuilderState(): void {
119
+ if (this.isAllVersionsEnabled) {
120
+ if (
121
+ this.queryBuilderState.fetchStructureState.implementation instanceof
122
+ QueryBuilderTDSState
123
+ ) {
124
+ this.queryBuilderState.fetchStructureState.implementation.tdsColumns.forEach(
125
+ (column) => {
126
+ if (column instanceof QueryBuilderSimpleProjectionColumnState) {
127
+ column.propertyExpressionState.derivedPropertyExpressionStates[0]?.parameterValues.forEach(
128
+ (p) => {
129
+ if (p instanceof INTERNAL__PropagatedValue) {
130
+ p.isPropagatedValue = false;
131
+ }
132
+ },
133
+ );
134
+ } else if (
135
+ column instanceof QueryBuilderAggregateColumnState &&
136
+ column.projectionColumnState instanceof
137
+ QueryBuilderSimpleProjectionColumnState
138
+ ) {
139
+ column.projectionColumnState.propertyExpressionState.derivedPropertyExpressionStates[0]?.parameterValues.forEach(
140
+ (p) => {
141
+ if (p instanceof INTERNAL__PropagatedValue) {
142
+ p.isPropagatedValue = false;
143
+ }
144
+ },
145
+ );
146
+ }
147
+ },
148
+ );
149
+ }
150
+ this.queryBuilderState.filterState.nodes.forEach((node) => {
151
+ if (node instanceof QueryBuilderFilterTreeConditionNodeData) {
152
+ node.condition.propertyExpressionState.derivedPropertyExpressionStates[0]?.parameterValues.forEach(
153
+ (p) => {
154
+ if (p instanceof INTERNAL__PropagatedValue) {
155
+ p.isPropagatedValue = false;
156
+ }
157
+ },
158
+ );
159
+ } else if (node instanceof QueryBuilderFilterTreeExistsNodeData) {
160
+ if (
161
+ node.propertyExpressionState.derivedPropertyExpressionStates[0] &&
162
+ this.queryBuilderState.class?._generatedMilestonedProperties.includes(
163
+ node.propertyExpressionState.derivedPropertyExpressionStates[0]
164
+ .derivedProperty,
165
+ )
166
+ ) {
167
+ node.propertyExpressionState.derivedPropertyExpressionStates[0]?.parameterValues.forEach(
168
+ (p) => {
169
+ if (p instanceof INTERNAL__PropagatedValue) {
170
+ p.isPropagatedValue = false;
171
+ }
172
+ },
173
+ );
174
+ }
175
+ }
176
+ });
177
+ }
178
+ }
179
+
89
180
  get isMilestonedQuery(): boolean {
90
- return Boolean(this.businessDate ?? this.processingDate);
181
+ return (
182
+ Boolean(this.businessDate ?? this.processingDate) ||
183
+ this.queryBuilderState.getAllFunction ===
184
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS ||
185
+ this.queryBuilderState.getAllFunction ===
186
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS_IN_RANGE
187
+ );
188
+ }
189
+
190
+ get isCurrentClassMilestoned(): boolean {
191
+ const currentclass = this.queryBuilderState.class;
192
+ if (currentclass !== undefined) {
193
+ const stereotype = getMilestoneTemporalStereotype(
194
+ currentclass,
195
+ this.queryBuilderState.graphManagerState.graph,
196
+ );
197
+ return stereotype !== undefined;
198
+ }
199
+ return false;
200
+ }
201
+
202
+ get isCurrentClassSupportsVersionsInRange(): boolean {
203
+ const currentclass = this.queryBuilderState.class;
204
+ if (currentclass !== undefined) {
205
+ const stereotype = getMilestoneTemporalStereotype(
206
+ currentclass,
207
+ this.queryBuilderState.graphManagerState.graph,
208
+ );
209
+ return (
210
+ stereotype !== undefined &&
211
+ stereotype !== MILESTONING_STEREOTYPE.BITEMPORAL
212
+ );
213
+ }
214
+ return false;
215
+ }
216
+
217
+ get isAllVersionsEnabled(): boolean {
218
+ return (
219
+ this.queryBuilderState.getAllFunction ===
220
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS ||
221
+ this.queryBuilderState.getAllFunction ===
222
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS_IN_RANGE
223
+ );
224
+ }
225
+
226
+ get isAllVersionsInRangeEnabled(): boolean {
227
+ return (
228
+ this.queryBuilderState.getAllFunction ===
229
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS_IN_RANGE
230
+ );
231
+ }
232
+
233
+ get isInvalidAllVersionsInRange(): boolean {
234
+ if (
235
+ (this.startDate && !this.endDate) ||
236
+ (!this.startDate && this.endDate)
237
+ ) {
238
+ return true;
239
+ }
240
+ return false;
241
+ }
242
+
243
+ setAllVersionsInRange(val: boolean | undefined): void {
244
+ if (val) {
245
+ this.queryBuilderState.setGetAllFunction(
246
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS_IN_RANGE,
247
+ );
248
+ this.initializeAllVersionsInRangeParameters();
249
+ } else {
250
+ this.queryBuilderState.setGetAllFunction(
251
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS,
252
+ );
253
+ this.clearAllVersionsInRangeParameters();
254
+ }
255
+ }
256
+
257
+ setAllVersions(val: boolean | undefined): void {
258
+ if (val) {
259
+ this.queryBuilderState.setGetAllFunction(
260
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS,
261
+ );
262
+ this.clearGetAllParameters();
263
+ } else {
264
+ this.queryBuilderState.setGetAllFunction(
265
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL,
266
+ );
267
+ this.clearAllVersionsInRangeParameters();
268
+ this.updateMilestoningConfiguration();
269
+ }
270
+ this.updateQueryBuilderState();
271
+ }
272
+
273
+ setStartDate(val: ValueSpecification | undefined): void {
274
+ this.startDate = val
275
+ ? observe_ValueSpecification(val, this.queryBuilderState.observerContext)
276
+ : val;
277
+ }
278
+
279
+ setEndDate(val: ValueSpecification | undefined): void {
280
+ this.endDate = val
281
+ ? observe_ValueSpecification(val, this.queryBuilderState.observerContext)
282
+ : val;
91
283
  }
92
284
 
93
285
  setShowMilestoningEditor(val: boolean): void {
@@ -124,6 +316,92 @@ export class QueryBuilderMilestoningState implements Hashable {
124
316
  : val;
125
317
  }
126
318
 
319
+ initializeAllVersionsInRangeParameters(): void {
320
+ this.setStartDate(
321
+ this.buildMilestoningParameter(MILESTONING_START_DATE_PARAMETER_NAME),
322
+ );
323
+ this.setEndDate(
324
+ this.buildMilestoningParameter(MILESTONING_END_DATE_PARAMETER_NAME),
325
+ );
326
+ }
327
+
328
+ clearGetAllParameters(): void {
329
+ if (
330
+ this.businessDate instanceof VariableExpression &&
331
+ !this.queryBuilderState.isVariableUsed(this.businessDate, {
332
+ exculdeMilestoningState: true,
333
+ })
334
+ ) {
335
+ const paramState =
336
+ this.queryBuilderState.parametersState.parameterStates.find(
337
+ (p) =>
338
+ p.parameter.name ===
339
+ guaranteeType(this.businessDate, VariableExpression).name,
340
+ );
341
+ if (paramState) {
342
+ this.queryBuilderState.parametersState.removeParameter(paramState);
343
+ }
344
+ this.setBusinessDate(undefined);
345
+ }
346
+ if (
347
+ this.processingDate instanceof VariableExpression &&
348
+ !this.queryBuilderState.isVariableUsed(this.processingDate, {
349
+ exculdeMilestoningState: true,
350
+ })
351
+ ) {
352
+ const paramState =
353
+ this.queryBuilderState.parametersState.parameterStates.find(
354
+ (p) =>
355
+ p.parameter.name ===
356
+ guaranteeType(this.processingDate, VariableExpression).name,
357
+ );
358
+ if (paramState) {
359
+ this.queryBuilderState.parametersState.removeParameter(paramState);
360
+ }
361
+ this.setProcessingDate(undefined);
362
+ }
363
+ // Reset miletoning dates when they are of type `PrimitiveInstanceValue`
364
+ if (this.businessDate instanceof PrimitiveInstanceValue) {
365
+ this.setBusinessDate(undefined);
366
+ }
367
+ if (this.processingDate instanceof PrimitiveInstanceValue) {
368
+ this.setProcessingDate(undefined);
369
+ }
370
+ }
371
+
372
+ clearAllVersionsInRangeParameters(): void {
373
+ if (
374
+ this.startDate instanceof VariableExpression &&
375
+ !this.queryBuilderState.isVariableUsed(this.startDate, {
376
+ exculdeMilestoningState: true,
377
+ })
378
+ ) {
379
+ const paramState =
380
+ this.queryBuilderState.parametersState.parameterStates.find(
381
+ (p) => p.parameter === this.startDate,
382
+ );
383
+ this.queryBuilderState.parametersState.removeParameter(
384
+ guaranteeNonNullable(paramState),
385
+ );
386
+ }
387
+ if (
388
+ this.endDate instanceof VariableExpression &&
389
+ !this.queryBuilderState.isVariableUsed(this.endDate, {
390
+ exculdeMilestoningState: true,
391
+ })
392
+ ) {
393
+ const paramState =
394
+ this.queryBuilderState.parametersState.parameterStates.find(
395
+ (p) => p.parameter === this.endDate,
396
+ );
397
+ this.queryBuilderState.parametersState.removeParameter(
398
+ guaranteeNonNullable(paramState),
399
+ );
400
+ }
401
+ this.setStartDate(undefined);
402
+ this.setEndDate(undefined);
403
+ }
404
+
127
405
  clearMilestoningDates(): void {
128
406
  this.setBusinessDate(undefined);
129
407
  this.setProcessingDate(undefined);
@@ -22,7 +22,11 @@ import {
22
22
  INTERNAL__PropagatedValue,
23
23
  PrimitiveType,
24
24
  } from '@finos/legend-graph';
25
- import { assertTrue, guaranteeNonNullable } from '@finos/legend-shared';
25
+ import {
26
+ UnsupportedOperationError,
27
+ assertTrue,
28
+ guaranteeNonNullable,
29
+ } from '@finos/legend-shared';
26
30
  import { getParameterValue } from '../../components/QueryBuilderSideBar.js';
27
31
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graph/QueryBuilderMetaModelConst.js';
28
32
  import { createSupportedFunctionExpression } from '../shared/ValueSpecificationEditorHelper.js';
@@ -66,6 +70,23 @@ export class QueryBuilderProcessingTemporalMilestoningImplementation extends Que
66
70
  );
67
71
  }
68
72
 
73
+ buildGetAllVersionsInRangeParameters(
74
+ getAllVersionsInRangeFunction: SimpleFunctionExpression,
75
+ ): void {
76
+ if (this.milestoningState.startDate && this.milestoningState.endDate) {
77
+ getAllVersionsInRangeFunction.parametersValues.push(
78
+ this.milestoningState.startDate,
79
+ );
80
+ getAllVersionsInRangeFunction.parametersValues.push(
81
+ this.milestoningState.endDate,
82
+ );
83
+ } else {
84
+ throw new UnsupportedOperationError(
85
+ `Can't build getAllVersionsInRange() function: expected both startDate and endDate`,
86
+ );
87
+ }
88
+ }
89
+
69
90
  buildGetAllWithDefaultParameters(
70
91
  getAllFunction: SimpleFunctionExpression,
71
92
  ): void {
@@ -20,7 +20,7 @@ import {
20
20
  matchFunctionName,
21
21
  } from '@finos/legend-graph';
22
22
  import { assertTrue, guaranteeType } from '@finos/legend-shared';
23
- import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graph/QueryBuilderMetaModelConst.js';
23
+ import { QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS } from '../../graph/QueryBuilderMetaModelConst.js';
24
24
  import type { QueryBuilderState } from '../QueryBuilderState.js';
25
25
  import { QueryBuilderValueSpecificationProcessor } from '../QueryBuilderStateBuilder.js';
26
26
 
@@ -37,7 +37,9 @@ export const processWatermarkExpression = (
37
37
  );
38
38
  assertTrue(
39
39
  matchFunctionName(precedingExpression.functionName, [
40
- QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL,
40
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL,
41
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS,
42
+ QUERY_BUILDER_SUPPORTED_GET_ALL_FUNCTIONS.GET_ALL_VERSIONS_IN_RANGE,
41
43
  ]),
42
44
  `Can't process forWatermark() expression: only support forWatermark() immediately following getAll()`,
43
45
  );