@finos/legend-query-builder 4.9.3 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderTesting.d.ts +3 -1
- package/lib/__lib__/QueryBuilderTesting.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTesting.js +4 -1
- package/lib/__lib__/QueryBuilderTesting.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +36 -33
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +1 -0
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +13 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +2 -2
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +42 -24
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +5 -6
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +2 -2
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +5 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +14 -1
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.d.ts +2 -0
- package/lib/stores/QueryBuilderStateHashUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.js +2 -0
- package/lib/stores/QueryBuilderStateHashUtils.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +3 -23
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +26 -8
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +6 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js +5 -4
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +31 -5
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +125 -30
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +21 -8
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts +3 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +20 -17
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +4 -6
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +4 -6
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -10
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +10 -10
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +5 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +32 -27
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +10 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +10 -10
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +5 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +4 -6
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js +17 -3
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/package.json +5 -5
- package/src/__lib__/QueryBuilderTesting.ts +4 -1
- package/src/components/QueryBuilderResultPanel.tsx +64 -59
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +25 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +102 -49
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +24 -17
- package/src/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +3 -4
- package/src/stores/QueryBuilderConstantsState.ts +30 -0
- package/src/stores/QueryBuilderStateHashUtils.ts +2 -0
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +4 -50
- package/src/stores/explorer/QueryBuilderExplorerState.ts +43 -13
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +10 -0
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.ts +2 -3
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.ts +7 -6
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +180 -34
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +38 -9
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +36 -20
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +5 -6
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +6 -6
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +12 -13
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +10 -9
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +5 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +48 -43
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +12 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +10 -9
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +5 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +6 -6
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.ts +26 -4
@@ -17,7 +17,7 @@ import { PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
|
17
17
|
import { hashArray, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
19
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
20
|
-
import { buildNotExpression, generateDefaultValueForPrimitiveType,
|
20
|
+
import { buildNotExpression, generateDefaultValueForPrimitiveType, unwrapNotExpression, } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
21
21
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
22
22
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
23
23
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
@@ -30,13 +30,11 @@ export class QueryBuilderPostFilterOperator_EndWith extends QueryBuilderPostFilt
|
|
30
30
|
return PrimitiveType.STRING === type;
|
31
31
|
}
|
32
32
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
33
|
-
|
34
|
-
|
35
|
-
: undefined;
|
36
|
-
return PrimitiveType.STRING === type;
|
33
|
+
return (!postFilterConditionState.rightConditionValue.isCollection &&
|
34
|
+
PrimitiveType.STRING === postFilterConditionState.rightConditionValue.type);
|
37
35
|
}
|
38
36
|
getDefaultFilterConditionValue(postFilterConditionState) {
|
39
|
-
const propertyType = postFilterConditionState.
|
37
|
+
const propertyType = postFilterConditionState.leftConditionValue.getColumnType();
|
40
38
|
switch (propertyType?.path) {
|
41
39
|
case PRIMITIVE_TYPE.STRING: {
|
42
40
|
return buildPrimitiveInstanceValue(postFilterConditionState.postFilterState.tdsState.queryBuilderState
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_EndWith.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAKL,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,SAAS,EACT,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAKzF,OAAO,EACL,kBAAkB,EAClB,oCAAoC,EACpC,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_EndWith.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAKL,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,SAAS,EACT,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAKzF,OAAO,EACL,kBAAkB,EAClB,oCAAoC,EACpC,mBAAmB,GACpB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AACvG,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAC/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AAEnG,MAAM,OAAO,sCACX,SAAQ,8BAA8B;IAGtC,QAAQ;QACN,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,oBAAoB,CAAC,IAAU;QAC7B,OAAO,aAAa,CAAC,MAAM,KAAK,IAAI,CAAC;IACvC,CAAC;IAED,8BAA8B,CAC5B,wBAAkD;QAElD,OAAO,CACL,CAAC,wBAAwB,CAAC,mBAAmB,CA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CACzB,CAAC;QACF,OAAO,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,CAAC;IAEQ,6BAA6B,CACpC,eAA4C,EAC5C,UAAoC;QAEpC,MAAM,eAAe,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACxD,OAAO,eAAe;YACpB,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC,eAAe,EAAE,eAAe,CAAC;YACvE,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,iCAAiC;SACrE,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
import { type Type, type ValueSpecification, type SimpleFunctionExpression, type FunctionExpression } from '@finos/legend-graph';
|
17
17
|
import { type Hashable } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
|
-
import type
|
19
|
+
import { type PostFilterConditionState, type QueryBuilderPostFilterState } from '../QueryBuilderPostFilterState.js';
|
20
20
|
export declare class QueryBuilderPostFilterOperator_Equal extends QueryBuilderPostFilterOperator implements Hashable {
|
21
21
|
getLabel(): string;
|
22
22
|
isCompatibleWithType(type: Type): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_Equal.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_Equal.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EASxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EACjC,MAAM,mCAAmC,CAAC;AAa3C,qBAAa,oCACX,SAAQ,8BACR,YAAW,QAAQ;IAEnB,QAAQ,IAAI,MAAM;IAIlB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAoBzC,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO;IAYV,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB;IAkErB,kCAAkC,CAChC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAajC,6BAA6B,CAC3B,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IAevC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF;AACD,qBAAa,uCAAwC,SAAQ,oCAAoC;IACtF,QAAQ,IAAI,MAAM;IAIlB,kCAAkC,CACzC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAOxB,6BAA6B,CACpC,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,wBAAwB,GACnC,wBAAwB,GAAG,SAAS;IAOvC,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js
CHANGED
@@ -13,11 +13,12 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { AbstractPropertyExpression, Enumeration, EnumValueExplicitReference, EnumValueInstanceValue, GenericType, GenericTypeExplicitReference, PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
16
|
+
import { AbstractPropertyExpression, Enumeration, EnumValueExplicitReference, EnumValueInstanceValue, GenericType, GenericTypeExplicitReference, PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
17
17
|
import { guaranteeNonNullable, hashArray, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
19
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
20
|
-
import {
|
20
|
+
import {} from '../QueryBuilderPostFilterState.js';
|
21
|
+
import { buildNotExpression, generateDefaultValueForPrimitiveType, isTypeCompatibleForAssignment, unwrapNotExpression, } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
21
22
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
22
23
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
23
24
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
@@ -43,14 +44,13 @@ export class QueryBuilderPostFilterOperator_Equal extends QueryBuilderPostFilter
|
|
43
44
|
(type instanceof Enumeration && type.values.length > 0));
|
44
45
|
}
|
45
46
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
46
|
-
|
47
|
-
|
48
|
-
return isTypeCompatibleForAssignment(getNonCollectionValueSpecificationType(valueSpecification), guaranteeNonNullable(postFilterConditionState.columnState.getColumnType()));
|
47
|
+
if (!postFilterConditionState.rightConditionValue.isCollection) {
|
48
|
+
return isTypeCompatibleForAssignment(postFilterConditionState.rightConditionValue.type, guaranteeNonNullable(postFilterConditionState.leftConditionValue.getColumnType()));
|
49
49
|
}
|
50
50
|
return false;
|
51
51
|
}
|
52
52
|
getDefaultFilterConditionValue(postFilterConditionState) {
|
53
|
-
const propertyType = guaranteeNonNullable(postFilterConditionState.
|
53
|
+
const propertyType = guaranteeNonNullable(postFilterConditionState.leftConditionValue.getColumnType());
|
54
54
|
switch (propertyType.path) {
|
55
55
|
case PRIMITIVE_TYPE.STRING:
|
56
56
|
case PRIMITIVE_TYPE.BOOLEAN:
|
@@ -85,10 +85,10 @@ export class QueryBuilderPostFilterOperator_Equal extends QueryBuilderPostFilter
|
|
85
85
|
}
|
86
86
|
}
|
87
87
|
buildPostFilterConditionExpression(postFilterConditionState) {
|
88
|
-
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.
|
89
|
-
|
90
|
-
postFilterConditionState.
|
91
|
-
|
88
|
+
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.leftConditionValue.getColumnType() ===
|
89
|
+
PrimitiveType.DATETIME &&
|
90
|
+
postFilterConditionState.rightConditionValue.type !==
|
91
|
+
PrimitiveType.DATETIME
|
92
92
|
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.IS_ON_DAY
|
93
93
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.EQUAL);
|
94
94
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_Equal.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAML,0BAA0B,EAC1B,WAAW,EACX,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACX,4BAA4B,EAC5B,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_Equal.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts"],"names":[],"mappings":"AAAA;;;;;;;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src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThan.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAU3C,qBAAa,0CACX,SAAQ,8BACR,YAAW,QAAQ;IAEnB,QAAQ,IAAI,MAAM;IAIlB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAczC,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO;IAWV,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB;IAoCrB,kCAAkC,CAChC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAajC,6BAA6B,CAC3B,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IAevC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF"}
|
@@ -13,11 +13,11 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { AbstractPropertyExpression, PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
16
|
+
import { AbstractPropertyExpression, PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
17
17
|
import { guaranteeNonNullable, hashArray, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
19
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
20
|
-
import { generateDefaultValueForPrimitiveType,
|
20
|
+
import { generateDefaultValueForPrimitiveType, isTypeCompatibleForAssignment, } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
21
21
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
22
22
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
23
23
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
@@ -38,12 +38,12 @@ export class QueryBuilderPostFilterOperator_GreaterThan extends QueryBuilderPost
|
|
38
38
|
].includes(type.path);
|
39
39
|
}
|
40
40
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
41
|
-
return isTypeCompatibleForAssignment(postFilterConditionState.
|
42
|
-
?
|
43
|
-
: undefined, guaranteeNonNullable(postFilterConditionState.
|
41
|
+
return isTypeCompatibleForAssignment(!postFilterConditionState.rightConditionValue.isCollection
|
42
|
+
? postFilterConditionState.rightConditionValue.type
|
43
|
+
: undefined, guaranteeNonNullable(postFilterConditionState.leftConditionValue.getColumnType()));
|
44
44
|
}
|
45
45
|
getDefaultFilterConditionValue(postFilterConditionState) {
|
46
|
-
const propertyType = postFilterConditionState.
|
46
|
+
const propertyType = postFilterConditionState.leftConditionValue.getColumnType();
|
47
47
|
switch (propertyType?.path) {
|
48
48
|
case PRIMITIVE_TYPE.NUMBER:
|
49
49
|
case PRIMITIVE_TYPE.DECIMAL:
|
@@ -65,10 +65,10 @@ export class QueryBuilderPostFilterOperator_GreaterThan extends QueryBuilderPost
|
|
65
65
|
}
|
66
66
|
}
|
67
67
|
buildPostFilterConditionExpression(postFilterConditionState) {
|
68
|
-
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.
|
69
|
-
|
70
|
-
postFilterConditionState.
|
71
|
-
|
68
|
+
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.leftConditionValue.getColumnType() ===
|
69
|
+
PrimitiveType.DATETIME &&
|
70
|
+
postFilterConditionState.rightConditionValue.type !==
|
71
|
+
PrimitiveType.DATETIME
|
72
72
|
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.IS_AFTER_DAY
|
73
73
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.GREATER_THAN);
|
74
74
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThan.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,0BAA0B,EAC1B,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThan.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,0BAA0B,EAC1B,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EAEpB,SAAS,EACT,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAKzF,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,qDAAqD,CAAC;AAC7D,O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AAI,KAAK,cAAc,CAAC,QAAQ;YACnC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;gBAC7D,cAAc,CAAC,QAAQ;YACzB,CAAC,CAAC,iCAAiC,CAAC,YAAY;YAChD,CAAC,CAAC,iCAAiC,CAAC,YAAY,EAClD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,iCAAiC;SACrE,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThanEqual.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAK7G,qBAAa,+CAAgD,SAAQ,0CAA0C;IACpG,QAAQ,IAAI,MAAM;IAIlB,kCAAkC,CACzC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAaxB,6BAA6B,CACpC,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IAevC,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
@@ -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 { AbstractPropertyExpression, PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
16
|
+
import { AbstractPropertyExpression, PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
17
17
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
18
18
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
19
19
|
import { QueryBuilderPostFilterOperator_GreaterThan } from './QueryBuilderPostFilterOperator_GreaterThan.js';
|
@@ -25,10 +25,10 @@ export class QueryBuilderPostFilterOperator_GreaterThanEqual extends QueryBuilde
|
|
25
25
|
return '>=';
|
26
26
|
}
|
27
27
|
buildPostFilterConditionExpression(postFilterConditionState) {
|
28
|
-
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.
|
29
|
-
|
30
|
-
postFilterConditionState.
|
31
|
-
|
28
|
+
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.leftConditionValue.getColumnType() ===
|
29
|
+
PrimitiveType.DATETIME &&
|
30
|
+
postFilterConditionState.rightConditionValue.type !==
|
31
|
+
PrimitiveType.DATETIME
|
32
32
|
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.IS_ON_OR_AFTER_DAY
|
33
33
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.GREATER_THAN_EQUAL);
|
34
34
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThanEqual.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAC1B,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_GreaterThanEqual.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAC1B,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAKzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAE/F,MAAM,OAAO,+CAAgD,SAAQ,0CAA0C;IACpG,QAAQ;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,kCAAkC,CACzC,wBAAkD;QAElD,OAAO,kCAAkC,CACvC,wBAAwB,EACxB,IAAI,EACJ,wBAAwB,CAAC,kBAAkB,CAAC,aAAa,EAAE;YACzD,aAAa,CAAC,QAAQ;YACtB,wBAAwB,CAAC,mBAAmB,CAAC,IAAI;gBAC/C,aAAa,CAAC,QAAQ;YACxB,CAAC,CAAC,iCAAiC,CAAC,kBAAkB;YACtD,CAAC,CAAC,iCAAiC,CAAC,kBAAkB,CACzD,CAAC;IACJ,CAAC;IAEQ,6BAA6B,CACpC,eAA4C,EAC5C,UAA8B;QAE9B,OAAO,6BAA6B,CAClC,eAAe,EACf,UAAU,EACV,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,0BAA0B;YAClE,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;iBAChE,IAAI,KAAK,cAAc,CAAC,QAAQ;YACnC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;gBAC7D,cAAc,CAAC,QAAQ;YACzB,CAAC,CAAC,iCAAiC,CAAC,kBAAkB;YACtD,CAAC,CAAC,iCAAiC,CAAC,kBAAkB,EACxD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,uCAAuC;SAC3E,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
import { type Type, type ValueSpecification, type SimpleFunctionExpression, type FunctionExpression } from '@finos/legend-graph';
|
17
17
|
import { type Hashable } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
|
-
import type
|
19
|
+
import { type PostFilterConditionState, type QueryBuilderPostFilterState } from '../QueryBuilderPostFilterState.js';
|
20
20
|
export declare class QueryBuilderPostFilterOperator_In extends QueryBuilderPostFilterOperator implements Hashable {
|
21
21
|
getLabel(): string;
|
22
22
|
isCompatibleWithType(type: Type): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_In.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAQxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_In.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAQxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EACjC,MAAM,mCAAmC,CAAC;AAU3C,qBAAa,iCACX,SAAQ,8BACR,YAAW,QAAQ;IAEnB,QAAQ,IAAI,MAAM;IAIlB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAgBzC,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO;IAmDV,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB;IAUrB,kCAAkC,CAChC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAQjC,6BAA6B,CAC3B,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IASvC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF;AAED,qBAAa,oCAAqC,SAAQ,iCAAiC;IAChF,QAAQ,IAAI,MAAM;IAIlB,kCAAkC,CACzC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAOxB,6BAA6B,CACpC,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,wBAAwB,GACnC,wBAAwB,GAAG,SAAS;IAOvC,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js
CHANGED
@@ -17,6 +17,7 @@ import { CollectionInstanceValue, Enumeration, PRIMITIVE_TYPE, VariableExpressio
|
|
17
17
|
import { guaranteeNonNullable, hashArray, } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
19
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
20
|
+
import { PostFilterValueSpecConditionValueState, } from '../QueryBuilderPostFilterState.js';
|
20
21
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
21
22
|
import { buildNotExpression, getCollectionValueSpecificationType, unwrapNotExpression, } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
22
23
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
@@ -37,43 +38,47 @@ export class QueryBuilderPostFilterOperator_In extends QueryBuilderPostFilterOpe
|
|
37
38
|
type instanceof Enumeration);
|
38
39
|
}
|
39
40
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
40
|
-
const propertyType = guaranteeNonNullable(postFilterConditionState.
|
41
|
-
const
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
PRIMITIVE_TYPE.FLOAT,
|
56
|
-
].includes(propertyType.path)) {
|
57
|
-
return [
|
41
|
+
const propertyType = guaranteeNonNullable(postFilterConditionState.leftConditionValue.getColumnType());
|
42
|
+
const rightSide = postFilterConditionState.rightConditionValue;
|
43
|
+
// `in`/`not in` doest not support right hand value being column state as the multipliticy for columns are [0..1]
|
44
|
+
if (rightSide instanceof PostFilterValueSpecConditionValueState) {
|
45
|
+
const valueSpec = rightSide.value;
|
46
|
+
if (valueSpec instanceof CollectionInstanceValue) {
|
47
|
+
if (valueSpec.values.length === 0) {
|
48
|
+
return true;
|
49
|
+
}
|
50
|
+
const collectionType = getCollectionValueSpecificationType(postFilterConditionState.postFilterState.tdsState.queryBuilderState
|
51
|
+
.graphManagerState.graph, valueSpec.values);
|
52
|
+
if (!collectionType) {
|
53
|
+
return false;
|
54
|
+
}
|
55
|
+
if ([
|
58
56
|
PRIMITIVE_TYPE.NUMBER,
|
59
57
|
PRIMITIVE_TYPE.INTEGER,
|
60
58
|
PRIMITIVE_TYPE.DECIMAL,
|
61
59
|
PRIMITIVE_TYPE.FLOAT,
|
62
|
-
].includes(
|
60
|
+
].includes(propertyType.path)) {
|
61
|
+
return [
|
62
|
+
PRIMITIVE_TYPE.NUMBER,
|
63
|
+
PRIMITIVE_TYPE.INTEGER,
|
64
|
+
PRIMITIVE_TYPE.DECIMAL,
|
65
|
+
PRIMITIVE_TYPE.FLOAT,
|
66
|
+
].includes(collectionType.path);
|
67
|
+
}
|
68
|
+
return collectionType === propertyType;
|
63
69
|
}
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
return
|
70
|
+
else if (valueSpec instanceof VariableExpression) {
|
71
|
+
// check if not a single value
|
72
|
+
if (valueSpec.multiplicity.upperBound === 1) {
|
73
|
+
return false;
|
74
|
+
}
|
75
|
+
return propertyType === valueSpec.genericType?.value.rawType;
|
70
76
|
}
|
71
|
-
return propertyType === valueSpec.genericType?.value.rawType;
|
72
77
|
}
|
73
78
|
return false;
|
74
79
|
}
|
75
80
|
getDefaultFilterConditionValue(postFilterConditionState) {
|
76
|
-
const propertyType = guaranteeNonNullable(postFilterConditionState.
|
81
|
+
const propertyType = guaranteeNonNullable(postFilterConditionState.leftConditionValue.getColumnType());
|
77
82
|
return new CollectionInstanceValue(Multiplicity.ONE, GenericTypeExplicitReference.create(new GenericType(propertyType)));
|
78
83
|
}
|
79
84
|
buildPostFilterConditionExpression(postFilterConditionState) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_In.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,WAAW,EACX,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EAEpB,SAAS,GACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_In.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,WAAW,EACX,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EAEpB,SAAS,GACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EACL,sCAAsC,GAGvC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EACL,kBAAkB,EAClB,mCAAmC,EACnC,mBAAmB,GACpB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;A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AAM,UAAU,GAAG,KAAK,CAAC,kCAAkC,CACzD,wBAAwB,CACzB,CAAC;QACF,OAAO,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,CAAC;IAEQ,6BAA6B,CACpC,eAA4C,EAC5C,UAAoC;QAEpC,MAAM,eAAe,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACxD,OAAO,eAAe;YACpB,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC,eAAe,EAAE,eAAe,CAAC;YACvE,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,2BAA2B;SAC/D,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_IsEmpty.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,iBAAiB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_IsEmpty.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,iBAAiB,EAElB,MAAM,mCAAmC,CAAC;AAI3C,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAGhE,qBAAa,sCACX,SAAQ,8BACR,YAAW,QAAQ;IAEnB,QAAQ,IAAI,MAAM;IAIT,kBAAkB,IAAI,iBAAiB,GAAG,SAAS;IAI5D,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIzC,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO;IAWD,gCAAgC,CACvC,eAAe,EAAE,wBAAwB,GACxC,OAAO;IAiBV,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAIjC,kCAAkC,CAChC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAQjC,6BAA6B,CAC3B,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IASvC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF;AAED,qBAAa,yCAA0C,SAAQ,sCAAsC;IAC1F,QAAQ,IAAI,MAAM;IAIlB,kBAAkB,IAAI,iBAAiB,GAAG,SAAS;IAI5D,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
import { Enumeration, PrimitiveType, } from '@finos/legend-graph';
|
17
17
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
18
18
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
19
|
-
import { TDS_COLUMN_GETTER, } from '../QueryBuilderPostFilterState.js';
|
19
|
+
import { TDS_COLUMN_GETTER, PostFilterValueSpecConditionValueState, } from '../QueryBuilderPostFilterState.js';
|
20
20
|
import { QueryBuilderSimpleProjectionColumnState } from '../../projection/QueryBuilderProjectionColumnState.js';
|
21
21
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
22
22
|
import { isPropertyExpressionChainOptional } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
@@ -33,14 +33,19 @@ export class QueryBuilderPostFilterOperator_IsEmpty extends QueryBuilderPostFilt
|
|
33
33
|
return type instanceof PrimitiveType || type instanceof Enumeration;
|
34
34
|
}
|
35
35
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
36
|
-
|
36
|
+
if (postFilterConditionState.rightConditionValue instanceof
|
37
|
+
PostFilterValueSpecConditionValueState &&
|
38
|
+
postFilterConditionState.rightConditionValue.value === undefined) {
|
39
|
+
return true;
|
40
|
+
}
|
41
|
+
return false;
|
37
42
|
}
|
38
43
|
isCompatibleWithPostFilterColumn(postFilterState) {
|
39
|
-
const columnType = postFilterState.
|
44
|
+
const columnType = postFilterState.leftConditionValue.getColumnType();
|
40
45
|
if (columnType && this.isCompatibleWithType(columnType)) {
|
41
|
-
if (postFilterState.
|
46
|
+
if (postFilterState.leftConditionValue instanceof
|
42
47
|
QueryBuilderSimpleProjectionColumnState) {
|
43
|
-
return isPropertyExpressionChainOptional(postFilterState.
|
48
|
+
return isPropertyExpressionChainOptional(postFilterState.leftConditionValue.propertyExpressionState
|
44
49
|
.propertyExpression);
|
45
50
|
}
|
46
51
|
return true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_IsEmpty.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,WAAW,EACX,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAGL,iBAAiB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_IsEmpty.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,WAAW,EACX,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAGL,iBAAiB,EACjB,sCAAsC,GACvC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,uCAAuC,EAAE,MAAM,uDAAuD,CAAC;AAChH,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAiB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAE/F,MAAM,OAAO,sCACX,SAAQ,8BAA8B;IAGtC,QAAQ;QACN,OAAO,UAAU,CAAC;IACpB,CAAC;IAEQ,kBAAkB;QACzB,OAAO,iBAAiB,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,oBAAoB,CAAC,IAAU;QAC7B,OAAO,IAAI,YAAY,aAAa,IAAI,IAAI,YAAY,WAAW,CAAC;IACtE,CAAC;IAED,8BAA8B,CAC5B,wBAAkD;QAElD,IACE,wBAAwB,CAAC,mBAAmB;YAC1C,sCAAsC;YACxC,wBAAwB,CAAC,mBAAmB,CAAC,KAAK,KAAK,SAAS,EAChE;YACA,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEQ,gCAAgC,CACvC,eAAyC;QAEzC,MAAM,UAAU,GAAG,eAAe,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC;QACtE,IAAI,UAAU,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE;YACvD,IACE,eAAe,CAAC,kBAAkB;gBAClC,uCAAuC,EACvC;gBACA,OAAO,iCAAiC,CACtC,eAAe,CAAC,kBAAkB,CAAC,uBAAuB;qBACvD,kBAAkB,CACtB,CAAC;aACH;YACD,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,8BAA8B,CAC5B,wBAAkD;QAElD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,kCAAkC,CAChC,wBAAkD;QAElD,OAAO,kCAAkC,CACvC,wBAAwB,EACxB,IAAI,EACJ,SAAS,CACV,CAAC;IACJ,CAAC;IAED,6BAA6B,CAC3B,eAA4C,EAC5C,UAA8B;QAE9B,OAAO,6BAA6B,CAClC,eAAe,EACf,UAAU,EACV,SAAS,EACT,IAAI,CACL,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,6BAA6B;SACjE,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,yCAA0C,SAAQ,sCAAsC;IAC1F,QAAQ;QACf,OAAO,cAAc,CAAC;IACxB,CAAC;IAEQ,kBAAkB;QACzB,OAAO,iBAAiB,CAAC,WAAW,CAAC;IACvC,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,iCAAiC;SACrE,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThan.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThan.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAU3C,qBAAa,uCACX,SAAQ,8BACR,YAAW,QAAQ;IAEnB,QAAQ,IAAI,MAAM;IAIlB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAczC,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO;IAWV,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB;IAoCrB,kCAAkC,CAChC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAajC,6BAA6B,CAC3B,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IAevC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF"}
|
@@ -13,11 +13,11 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { AbstractPropertyExpression, PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
16
|
+
import { AbstractPropertyExpression, PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
17
17
|
import { guaranteeNonNullable, hashArray, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
19
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
20
|
-
import { generateDefaultValueForPrimitiveType,
|
20
|
+
import { generateDefaultValueForPrimitiveType, isTypeCompatibleForAssignment, } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
21
21
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
22
22
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
23
23
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
@@ -38,12 +38,12 @@ export class QueryBuilderPostFilterOperator_LessThan extends QueryBuilderPostFil
|
|
38
38
|
].includes(type.path);
|
39
39
|
}
|
40
40
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
41
|
-
return isTypeCompatibleForAssignment(postFilterConditionState.
|
42
|
-
?
|
43
|
-
: undefined, guaranteeNonNullable(postFilterConditionState.
|
41
|
+
return isTypeCompatibleForAssignment(!postFilterConditionState.rightConditionValue.isCollection
|
42
|
+
? postFilterConditionState.rightConditionValue.type
|
43
|
+
: undefined, guaranteeNonNullable(postFilterConditionState.leftConditionValue.getColumnType()));
|
44
44
|
}
|
45
45
|
getDefaultFilterConditionValue(postFilterConditionState) {
|
46
|
-
const propertyType = postFilterConditionState.
|
46
|
+
const propertyType = postFilterConditionState.leftConditionValue.getColumnType();
|
47
47
|
switch (propertyType?.path) {
|
48
48
|
case PRIMITIVE_TYPE.NUMBER:
|
49
49
|
case PRIMITIVE_TYPE.DECIMAL:
|
@@ -65,10 +65,10 @@ export class QueryBuilderPostFilterOperator_LessThan extends QueryBuilderPostFil
|
|
65
65
|
}
|
66
66
|
}
|
67
67
|
buildPostFilterConditionExpression(postFilterConditionState) {
|
68
|
-
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.
|
69
|
-
|
70
|
-
postFilterConditionState.
|
71
|
-
|
68
|
+
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.leftConditionValue.getColumnType() ===
|
69
|
+
PrimitiveType.DATETIME &&
|
70
|
+
postFilterConditionState.rightConditionValue.type !==
|
71
|
+
PrimitiveType.DATETIME
|
72
72
|
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.IS_BEFORE_DAY
|
73
73
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.LESS_THAN);
|
74
74
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThan.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAE1B,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThan.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAE1B,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EAEpB,SAAS,EACT,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAKzF,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAClH,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AACvG,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAC/F,OAAO,EAAE,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AAiC,CAAC,aAAa;YACjD,CAAC,CAAC,iCAAiC,CAAC,SAAS,EAC/C,IAAI,CACL,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,8BAA8B;SAClE,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThanEqual.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThanEqual.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,uCAAuC,EAAE,MAAM,8CAA8C,CAAC;AAEvG,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAGhE,qBAAa,4CACX,SAAQ,uCACR,YAAW,QAAQ;IAEV,QAAQ,IAAI,MAAM;IAIlB,kCAAkC,CACzC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAaxB,6BAA6B,CACpC,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IAevC,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
@@ -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 { AbstractPropertyExpression, PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
16
|
+
import { AbstractPropertyExpression, PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
17
17
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
18
18
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
19
19
|
import { QueryBuilderPostFilterOperator_LessThan } from './QueryBuilderPostFilterOperator_LessThan.js';
|
@@ -25,10 +25,10 @@ export class QueryBuilderPostFilterOperator_LessThanEqual extends QueryBuilderPo
|
|
25
25
|
return '<=';
|
26
26
|
}
|
27
27
|
buildPostFilterConditionExpression(postFilterConditionState) {
|
28
|
-
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.
|
29
|
-
|
30
|
-
postFilterConditionState.
|
31
|
-
|
28
|
+
return buildPostFilterConditionExpression(postFilterConditionState, this, postFilterConditionState.leftConditionValue.getColumnType() ===
|
29
|
+
PrimitiveType.DATETIME &&
|
30
|
+
postFilterConditionState.rightConditionValue.type !==
|
31
|
+
PrimitiveType.DATETIME
|
32
32
|
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.IS_ON_OR_BEFORE_DAY
|
33
33
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.LESS_THAN_EQUAL);
|
34
34
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThanEqual.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,0BAA0B,EAC1B,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_LessThanEqual.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/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W,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;gBAC7D,cAAc,CAAC,QAAQ;YACzB,CAAC,CAAC,iCAAiC,CAAC,mBAAmB;YACvD,CAAC,CAAC,iCAAiC,CAAC,eAAe,EACrD,IAAI,CACL,CAAC;IACJ,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,oCAAoC;SACxE,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPostFilterOperator_StartWith.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilderPostFilterOperator_StartWith.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAW3C,qBAAa,wCACX,SAAQ,8BACR,YAAW,QAAQ;IAEnB,QAAQ,IAAI,MAAM;IAIlB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIzC,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO;IAOV,8BAA8B,CAC5B,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB;IAqBrB,kCAAkC,CAChC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAQjC,6BAA6B,CAC3B,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,GAAG,SAAS;IASvC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF;AACD,qBAAa,2CACX,SAAQ,wCACR,YAAW,QAAQ;IAEV,QAAQ,IAAI,MAAM;IAIlB,kCAAkC,CACzC,wBAAwB,EAAE,wBAAwB,GACjD,kBAAkB,GAAG,SAAS;IAOxB,6BAA6B,CACpC,eAAe,EAAE,2BAA2B,EAC5C,UAAU,EAAE,wBAAwB,GACnC,wBAAwB,GAAG,SAAS;IAOvC,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
@@ -17,7 +17,7 @@ import { PRIMITIVE_TYPE, PrimitiveType, } from '@finos/legend-graph';
|
|
17
17
|
import { hashArray, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
19
19
|
import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBuilder.js';
|
20
|
-
import { buildNotExpression, generateDefaultValueForPrimitiveType,
|
20
|
+
import { buildNotExpression, generateDefaultValueForPrimitiveType, unwrapNotExpression, } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
21
21
|
import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
22
22
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
23
23
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
@@ -30,13 +30,11 @@ export class QueryBuilderPostFilterOperator_StartWith extends QueryBuilderPostFi
|
|
30
30
|
return PrimitiveType.STRING === type;
|
31
31
|
}
|
32
32
|
isCompatibleWithConditionValue(postFilterConditionState) {
|
33
|
-
|
34
|
-
|
35
|
-
: undefined;
|
36
|
-
return PrimitiveType.STRING === type;
|
33
|
+
return (!postFilterConditionState.rightConditionValue.isCollection &&
|
34
|
+
PrimitiveType.STRING === postFilterConditionState.rightConditionValue.type);
|
37
35
|
}
|
38
36
|
getDefaultFilterConditionValue(postFilterConditionState) {
|
39
|
-
const propertyType = postFilterConditionState.
|
37
|
+
const propertyType = postFilterConditionState.leftConditionValue.getColumnType();
|
40
38
|
switch (propertyType?.path) {
|
41
39
|
case PRIMITIVE_TYPE.STRING: {
|
42
40
|
return buildPrimitiveInstanceValue(postFilterConditionState.postFilterState.tdsState.queryBuilderState
|