@finos/legend-query-builder 4.10.1 → 4.10.2
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/__lib__/QueryBuilderEvent.d.ts +2 -1
- package/lib/__lib__/QueryBuilderEvent.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderEvent.js +1 -0
- package/lib/__lib__/QueryBuilderEvent.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +57 -44
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +2 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/graph/QueryBuilderMetaModelConst.d.ts +22 -1
- package/lib/graph/QueryBuilderMetaModelConst.d.ts.map +1 -1
- package/lib/graph/QueryBuilderMetaModelConst.js +24 -0
- package/lib/graph/QueryBuilderMetaModelConst.js.map +1 -1
- package/lib/index.css +0 -16
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.js +2 -1
- package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts +0 -3
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +2 -31
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +2 -0
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js +1 -1
- package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts +4 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js +37 -3
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +1 -4
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +1 -5
- package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js +2 -2
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +3 -2
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +9 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +2 -4
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +1 -15
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +3 -44
- 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 +13 -3
- 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.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +3 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts +2 -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 +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +2 -2
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +3 -10
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/__lib__/QueryBuilderEvent.ts +1 -0
- package/src/components/QueryBuilderResultPanel.tsx +76 -63
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +2 -4
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +1 -1
- package/src/graph/QueryBuilderMetaModelConst.ts +25 -0
- package/src/index.ts +9 -2
- package/src/stores/QueryBuilderPreviewDataHelper.ts +2 -4
- package/src/stores/QueryBuilderResultState.ts +1 -36
- package/src/stores/QueryBuilderState.ts +5 -0
- package/src/stores/QueryBuilderTypeaheadHelper.ts +2 -4
- package/src/stores/fetch-structure/tds/QueryBuilderTDSHelper.ts +58 -2
- package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +1 -5
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateOperator.ts +5 -9
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +16 -2
- package/src/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +2 -4
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterOperator.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +1 -50
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +22 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +4 -4
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +5 -5
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +5 -15
- package/src/stores/fetch-structure/tds/window/QueryBuilderWindowState.ts +1 -1
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
type Type,
|
|
27
27
|
Enumeration,
|
|
28
28
|
Multiplicity,
|
|
29
|
+
PrimitiveType,
|
|
29
30
|
} from '@finos/legend-graph';
|
|
30
31
|
import {
|
|
31
32
|
assertTrue,
|
|
@@ -169,10 +170,7 @@ export class QueryBuilderAggregateOperator_DistinctCount
|
|
|
169
170
|
override getReturnType(
|
|
170
171
|
aggregateColumnState: QueryBuilderAggregateColumnState,
|
|
171
172
|
): Type {
|
|
172
|
-
|
|
173
|
-
aggregateColumnState.aggregationState.tdsState.queryBuilderState
|
|
174
|
-
.graphManagerState.graph;
|
|
175
|
-
return graph.getType(PRIMITIVE_TYPE.INTEGER);
|
|
173
|
+
return PrimitiveType.INTEGER;
|
|
176
174
|
}
|
|
177
175
|
|
|
178
176
|
get hashCode(): string {
|
|
@@ -23,8 +23,8 @@ import { type Hashable, uuid } from '@finos/legend-shared';
|
|
|
23
23
|
import type {
|
|
24
24
|
PostFilterConditionState,
|
|
25
25
|
QueryBuilderPostFilterState,
|
|
26
|
-
TDS_COLUMN_GETTER,
|
|
27
26
|
} from './QueryBuilderPostFilterState.js';
|
|
27
|
+
import type { TDS_COLUMN_GETTER } from '../../../../graph/QueryBuilderMetaModelConst.js';
|
|
28
28
|
|
|
29
29
|
export abstract class QueryBuilderPostFilterOperator implements Hashable {
|
|
30
30
|
readonly uuid = uuid();
|
|
@@ -22,8 +22,6 @@ import {
|
|
|
22
22
|
type ExecutionResult,
|
|
23
23
|
type VariableExpression,
|
|
24
24
|
type SimpleFunctionExpression,
|
|
25
|
-
Enumeration,
|
|
26
|
-
PRIMITIVE_TYPE,
|
|
27
25
|
observe_ValueSpecification,
|
|
28
26
|
PrimitiveType,
|
|
29
27
|
CollectionInstanceValue,
|
|
@@ -38,7 +36,6 @@ import {
|
|
|
38
36
|
guaranteeNonNullable,
|
|
39
37
|
guaranteeType,
|
|
40
38
|
IllegalStateError,
|
|
41
|
-
UnsupportedOperationError,
|
|
42
39
|
uuid,
|
|
43
40
|
filterByType,
|
|
44
41
|
ActionState,
|
|
@@ -78,6 +75,7 @@ import {
|
|
|
78
75
|
isValueExpressionReferencedInValue,
|
|
79
76
|
} from '../../../QueryBuilderValueSpecificationHelper.js';
|
|
80
77
|
import { buildtdsPropertyExpressionFromColState } from './operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js';
|
|
78
|
+
import { TDS_COLUMN_GETTER } from '../../../../graph/QueryBuilderMetaModelConst.js';
|
|
81
79
|
|
|
82
80
|
export enum QUERY_BUILDER_POST_FILTER_DND_TYPE {
|
|
83
81
|
GROUP_CONDITION = 'GROUP_CONDITION',
|
|
@@ -85,53 +83,6 @@ export enum QUERY_BUILDER_POST_FILTER_DND_TYPE {
|
|
|
85
83
|
BLANK_CONDITION = 'BLANK_CONDITION',
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
export enum TDS_COLUMN_GETTER {
|
|
89
|
-
GET_STRING = 'getString',
|
|
90
|
-
GET_NUMBER = 'getNumber',
|
|
91
|
-
GET_INTEGER = 'getInteger',
|
|
92
|
-
GET_FLOAT = 'getFloat',
|
|
93
|
-
GET_DECIMAL = 'getDecimal',
|
|
94
|
-
GET_DATE = 'getDate',
|
|
95
|
-
GET_DATETIME = 'getDateTime',
|
|
96
|
-
GET_STRICTDATE = 'getStrictDate',
|
|
97
|
-
GET_BOOLEAN = 'getBoolean',
|
|
98
|
-
GET_ENUM = 'getEnum',
|
|
99
|
-
IS_NULL = 'isNull',
|
|
100
|
-
IS_NOT_NULL = 'isNotNull',
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export const getTDSColumnDerivedProperyFromType = (
|
|
104
|
-
type: Type,
|
|
105
|
-
): TDS_COLUMN_GETTER => {
|
|
106
|
-
if (type instanceof Enumeration) {
|
|
107
|
-
return TDS_COLUMN_GETTER.GET_ENUM;
|
|
108
|
-
}
|
|
109
|
-
switch (type.path) {
|
|
110
|
-
case PRIMITIVE_TYPE.STRING:
|
|
111
|
-
return TDS_COLUMN_GETTER.GET_STRING;
|
|
112
|
-
case PRIMITIVE_TYPE.NUMBER:
|
|
113
|
-
return TDS_COLUMN_GETTER.GET_NUMBER;
|
|
114
|
-
case PRIMITIVE_TYPE.INTEGER:
|
|
115
|
-
return TDS_COLUMN_GETTER.GET_INTEGER;
|
|
116
|
-
case PRIMITIVE_TYPE.FLOAT:
|
|
117
|
-
return TDS_COLUMN_GETTER.GET_FLOAT;
|
|
118
|
-
case PRIMITIVE_TYPE.DECIMAL:
|
|
119
|
-
return TDS_COLUMN_GETTER.GET_DECIMAL;
|
|
120
|
-
case PRIMITIVE_TYPE.DATE:
|
|
121
|
-
return TDS_COLUMN_GETTER.GET_DATE;
|
|
122
|
-
case PRIMITIVE_TYPE.DATETIME:
|
|
123
|
-
return TDS_COLUMN_GETTER.GET_DATETIME;
|
|
124
|
-
case PRIMITIVE_TYPE.STRICTDATE:
|
|
125
|
-
return TDS_COLUMN_GETTER.GET_STRICTDATE;
|
|
126
|
-
case PRIMITIVE_TYPE.BOOLEAN:
|
|
127
|
-
return TDS_COLUMN_GETTER.GET_BOOLEAN;
|
|
128
|
-
default:
|
|
129
|
-
throw new UnsupportedOperationError(
|
|
130
|
-
`Can't find TDS column derived property name for type: '${type.path}'`,
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
86
|
export const getTypeFromDerivedProperty = (
|
|
136
87
|
derivedProperty: TDS_COLUMN_GETTER,
|
|
137
88
|
graph: PureModel,
|
|
@@ -36,24 +36,29 @@ import {
|
|
|
36
36
|
} from '@finos/legend-shared';
|
|
37
37
|
import { QueryBuilderDerivationProjectionColumnState } from '../projection/QueryBuilderProjectionColumnState.js';
|
|
38
38
|
import type { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
|
|
39
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
getTDSColumnDerivedProperyFromType,
|
|
41
|
+
getTDSColumnState,
|
|
42
|
+
} from '../QueryBuilderTDSHelper.js';
|
|
40
43
|
import type { QueryBuilderPostFilterOperator } from './QueryBuilderPostFilterOperator.js';
|
|
41
44
|
import {
|
|
42
45
|
type QueryBuilderPostFilterState,
|
|
43
|
-
getTDSColumnDerivedProperyFromType,
|
|
44
46
|
PostFilterConditionState,
|
|
45
47
|
QueryBuilderPostFilterTreeConditionNodeData,
|
|
46
48
|
QueryBuilderPostFilterTreeGroupNodeData,
|
|
47
|
-
TDS_COLUMN_GETTER,
|
|
48
49
|
getTypeFromDerivedProperty,
|
|
49
50
|
PostFilterValueSpecConditionValueState,
|
|
50
51
|
PostFilterTDSColumnValueConditionValueState,
|
|
51
52
|
} from './QueryBuilderPostFilterState.js';
|
|
52
|
-
import {
|
|
53
|
+
import {
|
|
54
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS,
|
|
55
|
+
TDS_COLUMN_GETTER,
|
|
56
|
+
} from '../../../../graph/QueryBuilderMetaModelConst.js';
|
|
53
57
|
import type { QueryBuilderState } from '../../../QueryBuilderState.js';
|
|
54
58
|
import { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
|
55
59
|
import { toGroupOperation } from '../../../QueryBuilderGroupOperationHelper.js';
|
|
56
60
|
import { simplifyValueExpression } from '../../../QueryBuilderValueSpecificationHelper.js';
|
|
61
|
+
import { QueryBuilderAggregateColumnState } from '../aggregation/QueryBuilderAggregationState.js';
|
|
57
62
|
|
|
58
63
|
const findProjectionColumnState = (
|
|
59
64
|
propertyExpression: AbstractPropertyExpression,
|
|
@@ -93,6 +98,19 @@ const findProjectionColumnState = (
|
|
|
93
98
|
columnState.setReturnType(type);
|
|
94
99
|
}
|
|
95
100
|
return columnState;
|
|
101
|
+
} else if (
|
|
102
|
+
columnState instanceof QueryBuilderAggregateColumnState &&
|
|
103
|
+
columnState.projectionColumnState instanceof
|
|
104
|
+
QueryBuilderDerivationProjectionColumnState
|
|
105
|
+
) {
|
|
106
|
+
const type = getTypeFromDerivedProperty(
|
|
107
|
+
tdsColumnGetter,
|
|
108
|
+
postFilterState.tdsState.queryBuilderState.graphManagerState.graph,
|
|
109
|
+
);
|
|
110
|
+
if (type) {
|
|
111
|
+
columnState.handleUsedPostFilterType(type);
|
|
112
|
+
}
|
|
113
|
+
return columnState;
|
|
96
114
|
}
|
|
97
115
|
const columnType = guaranteeNonNullable(columnState.getColumnType());
|
|
98
116
|
assertTrue(
|
|
@@ -31,13 +31,13 @@ import {
|
|
|
31
31
|
} from '@finos/legend-graph';
|
|
32
32
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
33
33
|
import type { QueryBuilderPostFilterOperator } from '../QueryBuilderPostFilterOperator.js';
|
|
34
|
+
import { type PostFilterConditionState } from '../QueryBuilderPostFilterState.js';
|
|
34
35
|
import {
|
|
35
|
-
|
|
36
|
+
QUERY_BUILDER_PURE_PATH,
|
|
36
37
|
type TDS_COLUMN_GETTER,
|
|
37
|
-
|
|
38
|
-
} from '../QueryBuilderPostFilterState.js';
|
|
39
|
-
import { QUERY_BUILDER_PURE_PATH } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
|
38
|
+
} from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
|
40
39
|
import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
|
|
40
|
+
import { getTDSColumnDerivedProperyFromType } from '../../QueryBuilderTDSHelper.js';
|
|
41
41
|
|
|
42
42
|
export const buildtdsPropertyExpressionFromColState = (
|
|
43
43
|
filterConditionState: PostFilterConditionState,
|
|
@@ -26,7 +26,6 @@ import { buildPostFilterConditionState } from '../QueryBuilderPostFilterStateBui
|
|
|
26
26
|
import {
|
|
27
27
|
type PostFilterConditionState,
|
|
28
28
|
type QueryBuilderPostFilterState,
|
|
29
|
-
TDS_COLUMN_GETTER,
|
|
30
29
|
PostFilterValueSpecConditionValueState,
|
|
31
30
|
} from '../QueryBuilderPostFilterState.js';
|
|
32
31
|
import { QueryBuilderSimpleProjectionColumnState } from '../../projection/QueryBuilderProjectionColumnState.js';
|
|
@@ -34,6 +33,7 @@ import { buildPostFilterConditionExpression } from './QueryBuilderPostFilterOper
|
|
|
34
33
|
import { isPropertyExpressionChainOptional } from '../../../../QueryBuilderValueSpecificationHelper.js';
|
|
35
34
|
import { type Hashable, hashArray } from '@finos/legend-shared';
|
|
36
35
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
|
36
|
+
import { TDS_COLUMN_GETTER } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
|
37
37
|
|
|
38
38
|
export class QueryBuilderPostFilterOperator_IsEmpty
|
|
39
39
|
extends QueryBuilderPostFilterOperator
|
|
@@ -37,7 +37,10 @@ import {
|
|
|
37
37
|
isNonNullable,
|
|
38
38
|
returnUndefOnError,
|
|
39
39
|
} from '@finos/legend-shared';
|
|
40
|
-
import {
|
|
40
|
+
import {
|
|
41
|
+
COLUMN_SORT_TYPE,
|
|
42
|
+
QUERY_BUILDER_SUPPORTED_FUNCTIONS,
|
|
43
|
+
} from '../../../../graph/QueryBuilderMetaModelConst.js';
|
|
41
44
|
import type { QueryBuilderState } from '../../../QueryBuilderState.js';
|
|
42
45
|
import { QueryBuilderValueSpecificationProcessor } from '../../../QueryBuilderStateBuilder.js';
|
|
43
46
|
import {
|
|
@@ -51,10 +54,7 @@ import {
|
|
|
51
54
|
QueryBuilderSimpleProjectionColumnState,
|
|
52
55
|
} from './QueryBuilderProjectionColumnState.js';
|
|
53
56
|
import { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
|
54
|
-
import {
|
|
55
|
-
COLUMN_SORT_TYPE,
|
|
56
|
-
SortColumnState,
|
|
57
|
-
} from '../QueryResultSetModifierState.js';
|
|
57
|
+
import { SortColumnState } from '../QueryResultSetModifierState.js';
|
|
58
58
|
|
|
59
59
|
export const processTDSProjectExpression = (
|
|
60
60
|
expression: SimpleFunctionExpression,
|
package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts
CHANGED
|
@@ -40,7 +40,6 @@ import {
|
|
|
40
40
|
} from './QueryBuilderProjectionColumnState.js';
|
|
41
41
|
import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
|
42
42
|
import {
|
|
43
|
-
COLUMN_SORT_TYPE,
|
|
44
43
|
type QueryResultSetModifierState,
|
|
45
44
|
type SortColumnState,
|
|
46
45
|
} from '../QueryResultSetModifierState.js';
|
|
@@ -49,24 +48,15 @@ import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderVa
|
|
|
49
48
|
import { buildPropertyExpressionChain } from '../../../QueryBuilderValueSpecificationBuilderHelper.js';
|
|
50
49
|
import { appendOLAPGroupByState } from '../window/QueryBuilderWindowValueSpecificationBuilder.js';
|
|
51
50
|
import { appendPostFilter } from '../post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js';
|
|
51
|
+
import { buildTDSSortTypeExpression } from '../QueryBuilderTDSHelper.js';
|
|
52
52
|
|
|
53
53
|
const buildSortExpression = (
|
|
54
54
|
sortColumnState: SortColumnState,
|
|
55
|
-
): SimpleFunctionExpression =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
? QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_ASC
|
|
60
|
-
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_DESC,
|
|
61
|
-
),
|
|
55
|
+
): SimpleFunctionExpression =>
|
|
56
|
+
buildTDSSortTypeExpression(
|
|
57
|
+
sortColumnState.sortType,
|
|
58
|
+
sortColumnState.columnState.columnName,
|
|
62
59
|
);
|
|
63
|
-
const sortColumnName = new PrimitiveInstanceValue(
|
|
64
|
-
GenericTypeExplicitReference.create(new GenericType(PrimitiveType.STRING)),
|
|
65
|
-
);
|
|
66
|
-
sortColumnName.values = [sortColumnState.columnState.columnName];
|
|
67
|
-
sortColumnFunction.parametersValues[0] = sortColumnName;
|
|
68
|
-
return sortColumnFunction;
|
|
69
|
-
};
|
|
70
60
|
|
|
71
61
|
const appendResultSetModifier = (
|
|
72
62
|
resultModifierState: QueryResultSetModifierState,
|
|
@@ -29,8 +29,8 @@ import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../../../QueryBuilderConfig.js';
|
|
|
29
29
|
import type { QueryBuilderProjectionColumnDragSource } from '../projection/QueryBuilderProjectionColumnState.js';
|
|
30
30
|
import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
|
|
31
31
|
import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
|
|
32
|
-
import type { COLUMN_SORT_TYPE } from '../QueryResultSetModifierState.js';
|
|
33
32
|
import type { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
|
|
33
|
+
import type { COLUMN_SORT_TYPE } from '../../../../graph/QueryBuilderMetaModelConst.js';
|
|
34
34
|
|
|
35
35
|
export const QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE = 'WINDOW_COLUMN';
|
|
36
36
|
|