@finos/legend-data-cube 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.css +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts +2 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js +25 -7
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts +8 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js +228 -3
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts +3 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js +79 -70
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js +4 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js +4 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js +11 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js +8 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js.map +1 -1
- package/lib/stores/view/DataCubeViewState.d.ts.map +1 -1
- package/lib/stores/view/DataCubeViewState.js +1 -1
- package/lib/stores/view/DataCubeViewState.js.map +1 -1
- package/package.json +7 -7
- package/src/stores/core/DataCubeQuerySnapshotBuilder.ts +38 -5
- package/src/stores/core/DataCubeQuerySnapshotBuilderUtils.ts +316 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Contain.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWith.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Equal.tsx +91 -72
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.tsx +11 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNull.tsx +11 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThan.tsx +18 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotContain.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWith.tsx +18 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.tsx +18 -4
- package/src/stores/view/DataCubeViewState.ts +1 -0
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import {
|
|
19
17
|
DataCubeQueryFilterOperation,
|
|
20
18
|
generateDefaultFilterConditionPrimitiveTypeValue,
|
|
@@ -35,6 +33,15 @@ import {
|
|
|
35
33
|
_value,
|
|
36
34
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
37
35
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
36
|
+
import {
|
|
37
|
+
V1_PrimitiveValueSpecification,
|
|
38
|
+
type V1_AppliedFunction,
|
|
39
|
+
type V1_AppliedProperty,
|
|
40
|
+
} from '@finos/legend-graph';
|
|
41
|
+
import {
|
|
42
|
+
_buildConditionSnapshotProperty,
|
|
43
|
+
_dataCubeOperationValue,
|
|
44
|
+
} from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
38
45
|
|
|
39
46
|
export class DataCubeQueryFilterOperation__Equal extends DataCubeQueryFilterOperation {
|
|
40
47
|
override get label() {
|
|
@@ -82,81 +89,93 @@ export class DataCubeQueryFilterOperation__Equal extends DataCubeQueryFilterOper
|
|
|
82
89
|
};
|
|
83
90
|
}
|
|
84
91
|
|
|
85
|
-
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
92
|
+
// buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
93
|
+
/** TODO: @datacube roundtrip */
|
|
94
|
+
// export const buildPostFilterConditionState = (
|
|
95
|
+
// postFilterState: QueryBuilderPostFilterState,
|
|
96
|
+
// expression: FunctionExpression,
|
|
97
|
+
// operatorFunctionFullPath | undefined,
|
|
98
|
+
// operator: QueryBuilderPostFilterOperator,
|
|
99
|
+
// ): PostFilterConditionState | undefined => {
|
|
100
|
+
// let postConditionState: PostFilterConditionState | undefined;
|
|
101
|
+
// const tdsColumnGetter = operator.getTDSColumnGetter();
|
|
102
|
+
// if (
|
|
103
|
+
// tdsColumnGetter &&
|
|
104
|
+
// expression instanceof AbstractPropertyExpression &&
|
|
105
|
+
// expression.func.value.name === tdsColumnGetter
|
|
106
|
+
// ) {
|
|
107
|
+
// const columnState = findProjectionColumnState(expression, postFilterState);
|
|
108
|
+
// postConditionState = new PostFilterConditionState(
|
|
109
|
+
// postFilterState,
|
|
110
|
+
// columnState,
|
|
111
|
+
// operator,
|
|
112
|
+
// );
|
|
113
|
+
// return postConditionState;
|
|
114
|
+
// } else if (
|
|
115
|
+
// operatorFunctionFullPath &&
|
|
116
|
+
// matchFunctionName(expression.functionName, operatorFunctionFullPath)
|
|
117
|
+
// ) {
|
|
118
|
+
// assertTrue(
|
|
119
|
+
// expression.parametersValues.length === 2,
|
|
120
|
+
// `Can't process ${extractElementNameFromPath(
|
|
121
|
+
// operatorFunctionFullPath,
|
|
122
|
+
// )}() expression: ${extractElementNameFromPath(
|
|
123
|
+
// operatorFunctionFullPath,
|
|
124
|
+
// )}() expects '1 argument'`,
|
|
125
|
+
// );
|
|
119
126
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
// // get projection column
|
|
128
|
+
// const tdsColumnPropertyExpression = guaranteeType(
|
|
129
|
+
// expression.parametersValues[0],
|
|
130
|
+
// AbstractPropertyExpression,
|
|
131
|
+
// `Can't process ${extractElementNameFromPath(
|
|
132
|
+
// operatorFunctionFullPath,
|
|
133
|
+
// )}() expression: expects property expression in lambda body`,
|
|
134
|
+
// );
|
|
135
|
+
// const columnState = findProjectionColumnState(
|
|
136
|
+
// tdsColumnPropertyExpression,
|
|
137
|
+
// postFilterState,
|
|
138
|
+
// );
|
|
132
139
|
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
// // get operation value specification
|
|
141
|
+
// const rightSide = expression.parametersValues[1];
|
|
135
142
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
// // create state
|
|
144
|
+
// postConditionState = new PostFilterConditionState(
|
|
145
|
+
// postFilterState,
|
|
146
|
+
// columnState,
|
|
147
|
+
// operator,
|
|
148
|
+
// );
|
|
142
149
|
|
|
143
|
-
|
|
150
|
+
// buildPostFilterConditionValueState(rightSide, postConditionState);
|
|
144
151
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
// //post checks
|
|
153
|
+
// assertTrue(
|
|
154
|
+
// operator.isCompatibleWithPostFilterColumn(postConditionState),
|
|
155
|
+
// `Can't process ${extractElementNameFromPath(
|
|
156
|
+
// operatorFunctionFullPath,
|
|
157
|
+
// )}() expression: property is not compatible with post-filter operator`,
|
|
158
|
+
// );
|
|
159
|
+
// assertTrue(
|
|
160
|
+
// operator.isCompatibleWithConditionValue(postConditionState),
|
|
161
|
+
// `Operator '${operator.getLabel()}' not compatible with value specification ${rightSide?.toString()}`,
|
|
162
|
+
// );
|
|
163
|
+
// }
|
|
164
|
+
// return postConditionState;
|
|
165
|
+
// };
|
|
166
|
+
// return undefined;
|
|
167
|
+
// }
|
|
168
|
+
|
|
169
|
+
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
170
|
+
const value = expression.parameters[1];
|
|
171
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
172
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
173
|
+
this.operator,
|
|
174
|
+
);
|
|
175
|
+
if (value instanceof V1_PrimitiveValueSpecification) {
|
|
176
|
+
filterConditionSnapshot.value = _dataCubeOperationValue(value);
|
|
177
|
+
}
|
|
178
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
160
179
|
}
|
|
161
180
|
|
|
162
181
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import {
|
|
19
17
|
DataCubeQueryFilterOperation,
|
|
20
18
|
generateDefaultFilterConditionPrimitiveTypeValue,
|
|
@@ -36,6 +34,15 @@ import {
|
|
|
36
34
|
_var,
|
|
37
35
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
38
36
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
37
|
+
import {
|
|
38
|
+
V1_PrimitiveValueSpecification,
|
|
39
|
+
type V1_AppliedFunction,
|
|
40
|
+
type V1_AppliedProperty,
|
|
41
|
+
} from '@finos/legend-graph';
|
|
42
|
+
import {
|
|
43
|
+
_buildConditionSnapshotProperty,
|
|
44
|
+
_dataCubeOperationValue,
|
|
45
|
+
} from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
39
46
|
|
|
40
47
|
export class DataCubeQueryFilterOperation__EqualCaseInsensitive extends DataCubeQueryFilterOperation {
|
|
41
48
|
override get label() {
|
|
@@ -74,8 +81,15 @@ export class DataCubeQueryFilterOperation__EqualCaseInsensitive extends DataCube
|
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
const value = expression.parameters[1];
|
|
85
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
86
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
87
|
+
this.operator,
|
|
88
|
+
);
|
|
89
|
+
if (value instanceof V1_PrimitiveValueSpecification) {
|
|
90
|
+
filterConditionSnapshot.value = _dataCubeOperationValue(value);
|
|
91
|
+
}
|
|
92
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
79
93
|
}
|
|
80
94
|
|
|
81
95
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -34,6 +32,11 @@ import {
|
|
|
34
32
|
_var,
|
|
35
33
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
36
34
|
import { guaranteeNonNullable, isString } from '@finos/legend-shared';
|
|
35
|
+
import {
|
|
36
|
+
V1_AppliedProperty,
|
|
37
|
+
type V1_AppliedFunction,
|
|
38
|
+
} from '@finos/legend-graph';
|
|
39
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
37
40
|
|
|
38
41
|
export class DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn extends DataCubeQueryFilterOperation {
|
|
39
42
|
override get label() {
|
|
@@ -72,8 +75,19 @@ export class DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn extends Da
|
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
const value = expression.parameters[1];
|
|
79
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
80
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
81
|
+
this.operator,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
if (value instanceof V1_AppliedProperty) {
|
|
85
|
+
filterConditionSnapshot.value = {
|
|
86
|
+
value: value.property,
|
|
87
|
+
type: DataCubeOperationAdvancedValueType.COLUMN,
|
|
88
|
+
} satisfies DataCubeOperationValue;
|
|
89
|
+
}
|
|
90
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -34,6 +32,11 @@ import {
|
|
|
34
32
|
_var,
|
|
35
33
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
36
34
|
import { guaranteeNonNullable, isString } from '@finos/legend-shared';
|
|
35
|
+
import {
|
|
36
|
+
V1_AppliedProperty,
|
|
37
|
+
type V1_AppliedFunction,
|
|
38
|
+
} from '@finos/legend-graph';
|
|
39
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
37
40
|
|
|
38
41
|
export class DataCubeQueryFilterOperation__EqualColumn extends DataCubeQueryFilterOperation {
|
|
39
42
|
override get label() {
|
|
@@ -77,8 +80,19 @@ export class DataCubeQueryFilterOperation__EqualColumn extends DataCubeQueryFilt
|
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
const value = expression.parameters[1];
|
|
84
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
85
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
86
|
+
this.operator,
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
if (value instanceof V1_AppliedProperty) {
|
|
90
|
+
filterConditionSnapshot.value = {
|
|
91
|
+
value: value.property,
|
|
92
|
+
type: DataCubeOperationAdvancedValueType.COLUMN,
|
|
93
|
+
} satisfies DataCubeOperationValue;
|
|
94
|
+
}
|
|
95
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import {
|
|
19
17
|
DataCubeQueryFilterOperation,
|
|
20
18
|
generateDefaultFilterConditionPrimitiveTypeValue,
|
|
@@ -35,6 +33,15 @@ import {
|
|
|
35
33
|
_value,
|
|
36
34
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
37
35
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
36
|
+
import {
|
|
37
|
+
V1_PrimitiveValueSpecification,
|
|
38
|
+
type V1_AppliedFunction,
|
|
39
|
+
type V1_AppliedProperty,
|
|
40
|
+
} from '@finos/legend-graph';
|
|
41
|
+
import {
|
|
42
|
+
_buildConditionSnapshotProperty,
|
|
43
|
+
_dataCubeOperationValue,
|
|
44
|
+
} from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
38
45
|
|
|
39
46
|
export class DataCubeQueryFilterOperation__GreaterThan extends DataCubeQueryFilterOperation {
|
|
40
47
|
override get label() {
|
|
@@ -81,8 +88,15 @@ export class DataCubeQueryFilterOperation__GreaterThan extends DataCubeQueryFilt
|
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
const value = expression.parameters[1];
|
|
92
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
93
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
94
|
+
this.operator,
|
|
95
|
+
);
|
|
96
|
+
if (value instanceof V1_PrimitiveValueSpecification) {
|
|
97
|
+
filterConditionSnapshot.value = _dataCubeOperationValue(value);
|
|
98
|
+
}
|
|
99
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
86
100
|
}
|
|
87
101
|
|
|
88
102
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -34,6 +32,11 @@ import {
|
|
|
34
32
|
_var,
|
|
35
33
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
36
34
|
import { guaranteeNonNullable, isString } from '@finos/legend-shared';
|
|
35
|
+
import {
|
|
36
|
+
V1_AppliedProperty,
|
|
37
|
+
type V1_AppliedFunction,
|
|
38
|
+
} from '@finos/legend-graph';
|
|
39
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
37
40
|
|
|
38
41
|
export class DataCubeQueryFilterOperation__GreaterThanColumn extends DataCubeQueryFilterOperation {
|
|
39
42
|
override get label() {
|
|
@@ -76,8 +79,19 @@ export class DataCubeQueryFilterOperation__GreaterThanColumn extends DataCubeQue
|
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
const value = expression.parameters[1];
|
|
83
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
84
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
85
|
+
this.operator,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
if (value instanceof V1_AppliedProperty) {
|
|
89
|
+
filterConditionSnapshot.value = {
|
|
90
|
+
value: value.property,
|
|
91
|
+
type: DataCubeOperationAdvancedValueType.COLUMN,
|
|
92
|
+
} satisfies DataCubeOperationValue;
|
|
93
|
+
}
|
|
94
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
81
95
|
}
|
|
82
96
|
|
|
83
97
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import {
|
|
19
17
|
DataCubeQueryFilterOperation,
|
|
20
18
|
generateDefaultFilterConditionPrimitiveTypeValue,
|
|
@@ -35,6 +33,15 @@ import {
|
|
|
35
33
|
_value,
|
|
36
34
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
37
35
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
36
|
+
import {
|
|
37
|
+
V1_PrimitiveValueSpecification,
|
|
38
|
+
type V1_AppliedFunction,
|
|
39
|
+
type V1_AppliedProperty,
|
|
40
|
+
} from '@finos/legend-graph';
|
|
41
|
+
import {
|
|
42
|
+
_buildConditionSnapshotProperty,
|
|
43
|
+
_dataCubeOperationValue,
|
|
44
|
+
} from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
38
45
|
|
|
39
46
|
export class DataCubeQueryFilterOperation__GreaterThanOrEqual extends DataCubeQueryFilterOperation {
|
|
40
47
|
override get label() {
|
|
@@ -81,8 +88,15 @@ export class DataCubeQueryFilterOperation__GreaterThanOrEqual extends DataCubeQu
|
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
const value = expression.parameters[1];
|
|
92
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
93
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
94
|
+
this.operator,
|
|
95
|
+
);
|
|
96
|
+
if (value instanceof V1_PrimitiveValueSpecification) {
|
|
97
|
+
filterConditionSnapshot.value = _dataCubeOperationValue(value);
|
|
98
|
+
}
|
|
99
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
86
100
|
}
|
|
87
101
|
|
|
88
102
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -34,6 +32,11 @@ import {
|
|
|
34
32
|
_var,
|
|
35
33
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
36
34
|
import { guaranteeNonNullable, isString } from '@finos/legend-shared';
|
|
35
|
+
import {
|
|
36
|
+
V1_AppliedProperty,
|
|
37
|
+
type V1_AppliedFunction,
|
|
38
|
+
} from '@finos/legend-graph';
|
|
39
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
37
40
|
|
|
38
41
|
export class DataCubeQueryFilterOperation__GreaterThanOrEqualColumn extends DataCubeQueryFilterOperation {
|
|
39
42
|
override get label() {
|
|
@@ -76,8 +79,19 @@ export class DataCubeQueryFilterOperation__GreaterThanOrEqualColumn extends Data
|
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
const value = expression.parameters[1];
|
|
83
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
84
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
85
|
+
this.operator,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
if (value instanceof V1_AppliedProperty) {
|
|
89
|
+
filterConditionSnapshot.value = {
|
|
90
|
+
value: value.property,
|
|
91
|
+
type: DataCubeOperationAdvancedValueType.COLUMN,
|
|
92
|
+
} satisfies DataCubeOperationValue;
|
|
93
|
+
}
|
|
94
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
81
95
|
}
|
|
82
96
|
|
|
83
97
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -31,6 +29,11 @@ import {
|
|
|
31
29
|
_not,
|
|
32
30
|
_property,
|
|
33
31
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
32
|
+
import type {
|
|
33
|
+
V1_AppliedFunction,
|
|
34
|
+
V1_AppliedProperty,
|
|
35
|
+
} from '@finos/legend-graph';
|
|
36
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
34
37
|
|
|
35
38
|
export class DataCubeQueryFilterOperation__IsNotNull extends DataCubeQueryFilterOperation {
|
|
36
39
|
override get label() {
|
|
@@ -76,8 +79,12 @@ export class DataCubeQueryFilterOperation__IsNotNull extends DataCubeQueryFilter
|
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
83
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
84
|
+
this.operator,
|
|
85
|
+
);
|
|
86
|
+
filterConditionSnapshot.value = undefined;
|
|
87
|
+
return filterConditionSnapshot;
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -30,6 +28,11 @@ import {
|
|
|
30
28
|
_functionName,
|
|
31
29
|
_property,
|
|
32
30
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
31
|
+
import type {
|
|
32
|
+
V1_AppliedFunction,
|
|
33
|
+
V1_AppliedProperty,
|
|
34
|
+
} from '@finos/legend-graph';
|
|
35
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
33
36
|
|
|
34
37
|
export class DataCubeQueryFilterOperation__IsNull extends DataCubeQueryFilterOperation {
|
|
35
38
|
override get label() {
|
|
@@ -75,8 +78,12 @@ export class DataCubeQueryFilterOperation__IsNull extends DataCubeQueryFilterOpe
|
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
82
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
83
|
+
this.operator,
|
|
84
|
+
);
|
|
85
|
+
filterConditionSnapshot.value = undefined;
|
|
86
|
+
return filterConditionSnapshot;
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
17
|
import {
|
|
19
18
|
DataCubeQueryFilterOperation,
|
|
20
19
|
generateDefaultFilterConditionPrimitiveTypeValue,
|
|
@@ -35,6 +34,15 @@ import {
|
|
|
35
34
|
_value,
|
|
36
35
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
37
36
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
37
|
+
import {
|
|
38
|
+
V1_PrimitiveValueSpecification,
|
|
39
|
+
type V1_AppliedFunction,
|
|
40
|
+
type V1_AppliedProperty,
|
|
41
|
+
} from '@finos/legend-graph';
|
|
42
|
+
import {
|
|
43
|
+
_buildConditionSnapshotProperty,
|
|
44
|
+
_dataCubeOperationValue,
|
|
45
|
+
} from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
38
46
|
|
|
39
47
|
export class DataCubeQueryFilterOperation__LessThan extends DataCubeQueryFilterOperation {
|
|
40
48
|
override get label() {
|
|
@@ -81,8 +89,15 @@ export class DataCubeQueryFilterOperation__LessThan extends DataCubeQueryFilterO
|
|
|
81
89
|
}
|
|
82
90
|
|
|
83
91
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
84
|
-
|
|
85
|
-
|
|
92
|
+
const value = expression.parameters[1];
|
|
93
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
94
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
95
|
+
this.operator,
|
|
96
|
+
);
|
|
97
|
+
if (value instanceof V1_PrimitiveValueSpecification) {
|
|
98
|
+
filterConditionSnapshot.value = _dataCubeOperationValue(value);
|
|
99
|
+
}
|
|
100
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
86
101
|
}
|
|
87
102
|
|
|
88
103
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { type V1_AppliedFunction } from '@finos/legend-graph';
|
|
18
16
|
import { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';
|
|
19
17
|
import type { DataCubeQuerySnapshotFilterCondition } from '../DataCubeQuerySnapshot.js';
|
|
20
18
|
import type { DataCubeColumn } from '../model/DataCubeColumn.js';
|
|
@@ -34,6 +32,11 @@ import {
|
|
|
34
32
|
_var,
|
|
35
33
|
} from '../DataCubeQueryBuilderUtils.js';
|
|
36
34
|
import { guaranteeNonNullable, isString } from '@finos/legend-shared';
|
|
35
|
+
import {
|
|
36
|
+
V1_AppliedProperty,
|
|
37
|
+
type V1_AppliedFunction,
|
|
38
|
+
} from '@finos/legend-graph';
|
|
39
|
+
import { _buildConditionSnapshotProperty } from '../DataCubeQuerySnapshotBuilderUtils.js';
|
|
37
40
|
|
|
38
41
|
export class DataCubeQueryFilterOperation__LessThanColumn extends DataCubeQueryFilterOperation {
|
|
39
42
|
override get label() {
|
|
@@ -76,8 +79,19 @@ export class DataCubeQueryFilterOperation__LessThanColumn extends DataCubeQueryF
|
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
buildConditionSnapshot(expression: V1_AppliedFunction) {
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
const value = expression.parameters[1];
|
|
83
|
+
const filterConditionSnapshot = _buildConditionSnapshotProperty(
|
|
84
|
+
expression.parameters[0] as V1_AppliedProperty,
|
|
85
|
+
this.operator,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
if (value instanceof V1_AppliedProperty) {
|
|
89
|
+
filterConditionSnapshot.value = {
|
|
90
|
+
value: value.property,
|
|
91
|
+
type: DataCubeOperationAdvancedValueType.COLUMN,
|
|
92
|
+
} satisfies DataCubeOperationValue;
|
|
93
|
+
}
|
|
94
|
+
return filterConditionSnapshot satisfies DataCubeQuerySnapshotFilterCondition;
|
|
81
95
|
}
|
|
82
96
|
|
|
83
97
|
buildConditionExpression(condition: DataCubeQuerySnapshotFilterCondition) {
|