query-layers-expression 1.0.8 → 1.0.10
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/build/index.d.ts +3 -1
- package/build/index.js +158 -144
- package/package.json +2 -2
- package/src/index.ts +139 -170
package/build/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ interface queryExpressionType {
|
|
|
7
7
|
status?: number | null;
|
|
8
8
|
statusField?: any;
|
|
9
9
|
qExpression?: any;
|
|
10
|
+
q2Expression?: any;
|
|
10
11
|
}
|
|
11
12
|
declare class QueryExpressionLayers implements queryExpressionType {
|
|
12
13
|
qValues?: [any?, any?, any?] | any;
|
|
@@ -17,7 +18,8 @@ declare class QueryExpressionLayers implements queryExpressionType {
|
|
|
17
18
|
status?: number | null;
|
|
18
19
|
statusField?: any;
|
|
19
20
|
qExpression?: any;
|
|
20
|
-
|
|
21
|
+
q2Expression?: any;
|
|
22
|
+
constructor(qValues: any, qFields: any, chartCategory: any, chartCategoryField: any, chartCategoryType: "number" | "string", status: number, statusField: any, qExpression: any, q2Expression: any);
|
|
21
23
|
queryExpression: () => string;
|
|
22
24
|
}
|
|
23
25
|
export default QueryExpressionLayers;
|
package/build/index.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
class QueryExpressionLayers {
|
|
4
|
-
constructor(qValues, qFields, chartCategory, chartCategoryField, chartCategoryType, status, statusField, qExpression) {
|
|
4
|
+
constructor(qValues, qFields, chartCategory, chartCategoryField, chartCategoryType, status, statusField, qExpression, q2Expression) {
|
|
5
5
|
//--- Method ---//
|
|
6
6
|
//--- Query Expression
|
|
7
7
|
this.queryExpression = () => {
|
|
8
8
|
//--- Basic query expression
|
|
9
|
-
this.qValues
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
: `${this.qFields?.[2]} = '${this.qValues?.[2]}'`;
|
|
9
|
+
const query1 = typeof this.qValues[0] === "number"
|
|
10
|
+
? `${this.qFields[0]} = ${this.qValues[0]}`
|
|
11
|
+
: `${this.qFields[0]} = '${this.qValues[0]}'`;
|
|
12
|
+
const query2 = typeof this.qValues[1] === "number"
|
|
13
|
+
? `${this.qFields[1]} = ${this.qValues[1]}`
|
|
14
|
+
: `${this.qFields[1]} = '${this.qValues[1]}'`;
|
|
15
|
+
const query3 = typeof this.qValues[2] === "number"
|
|
16
|
+
? `${this.qFields[2]} = ${this.qValues[2]}`
|
|
17
|
+
: `${this.qFields[2]} = '${this.qValues[2]}'`;
|
|
19
18
|
const query12 = `${query1} AND ${query2}`;
|
|
20
19
|
const query123 = `${query1} AND ${query2} AND ${query3}`;
|
|
21
20
|
const q_status = `${this.statusField} = ${this.status}`;
|
|
@@ -52,85 +51,93 @@ class QueryExpressionLayers {
|
|
|
52
51
|
if (this.qExpression) {
|
|
53
52
|
if (this.chartCategoryField) {
|
|
54
53
|
if (this.statusField) {
|
|
55
|
-
if (!this.qValues
|
|
56
|
-
expression =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
expression =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
expression =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
expression =
|
|
54
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
55
|
+
expression = !this.q2Expression
|
|
56
|
+
? q_status_chartC_qE
|
|
57
|
+
: `${q_status_chartC_qE} AND ${this.q2Expression}`;
|
|
58
|
+
}
|
|
59
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
60
|
+
expression = !this.q2Expression
|
|
61
|
+
? query1_status_chartC_qE
|
|
62
|
+
: `${query1_status_chartC_qE} AND ${this.q2Expression}`;
|
|
63
|
+
}
|
|
64
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
65
|
+
expression = !this.q2Expression
|
|
66
|
+
? query12_status_chartC_qE
|
|
67
|
+
: `${query12_status_chartC_qE} AND ${this.q2Expression}`;
|
|
68
|
+
}
|
|
69
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
70
|
+
expression = !this.q2Expression
|
|
71
|
+
? query123_status_chartC_qE
|
|
72
|
+
: `${query123_status_chartC_qE} AND ${this.q2Expression}`;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
else if (!this.statusField) {
|
|
75
|
-
if (!this.qValues
|
|
76
|
-
expression =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
expression =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
expression =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
expression =
|
|
76
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
77
|
+
expression = !this.q2Expression
|
|
78
|
+
? q_chartC_qE
|
|
79
|
+
: `${q_chartC_qE} AND ${this.q2Expression}`;
|
|
80
|
+
}
|
|
81
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
82
|
+
expression = !this.q2Expression
|
|
83
|
+
? query1_chartC_qE
|
|
84
|
+
: `${query1_chartC_qE} AND ${this.q2Expression}`;
|
|
85
|
+
}
|
|
86
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
87
|
+
expression = !this.q2Expression
|
|
88
|
+
? query12_chartC_qE
|
|
89
|
+
: `${query12_chartC_qE} AND ${this.q2Expression}`;
|
|
90
|
+
}
|
|
91
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
92
|
+
expression = !this.q2Expression
|
|
93
|
+
? query123_chartC_qE
|
|
94
|
+
: `${query123_chartC_qE} AND ${this.q2Expression}`;
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
else if (!this.chartCategoryField) {
|
|
96
99
|
if (this.statusField) {
|
|
97
|
-
if (!this.qValues
|
|
98
|
-
expression =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
expression =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
expression =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
expression =
|
|
100
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
101
|
+
expression = !this.q2Expression
|
|
102
|
+
? q_status_qE
|
|
103
|
+
: `${q_status_qE} AND ${this.q2Expression}`;
|
|
104
|
+
}
|
|
105
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
106
|
+
expression = !this.q2Expression
|
|
107
|
+
? query1_status_qE
|
|
108
|
+
: `${query1_status_qE} AND ${this.q2Expression}`;
|
|
109
|
+
}
|
|
110
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
111
|
+
expression = !this.q2Expression
|
|
112
|
+
? query12_status_qE
|
|
113
|
+
: `${query12_status_qE} AND ${this.q2Expression}`;
|
|
114
|
+
}
|
|
115
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
116
|
+
expression = !this.q2Expression
|
|
117
|
+
? query123_status_qE
|
|
118
|
+
: `${query123_status_qE} AND ${this.q2Expression}`;
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
121
|
else if (!this.statusField) {
|
|
117
|
-
if (!this.qValues
|
|
118
|
-
expression = this.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
expression =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
expression =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
expression =
|
|
122
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
123
|
+
expression = !this.q2Expression
|
|
124
|
+
? this.qExpression
|
|
125
|
+
: `${this.qExpression} AND ${this.q2Expression}`;
|
|
126
|
+
}
|
|
127
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
128
|
+
expression = !this.q2Expression
|
|
129
|
+
? query1_qE
|
|
130
|
+
: `${query1_qE} AND ${this.q2Expression}`;
|
|
131
|
+
}
|
|
132
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
133
|
+
expression = !this.q2Expression
|
|
134
|
+
? query12_qE
|
|
135
|
+
: `${query12_qE} AND ${this.q2Expression}`;
|
|
136
|
+
}
|
|
137
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
138
|
+
expression = !this.q2Expression
|
|
139
|
+
? query123_qE
|
|
140
|
+
: `${query123_qE} AND ${this.q2Expression}`;
|
|
134
141
|
}
|
|
135
142
|
}
|
|
136
143
|
}
|
|
@@ -138,85 +145,91 @@ class QueryExpressionLayers {
|
|
|
138
145
|
else if (!this.qExpression) {
|
|
139
146
|
if (this.chartCategoryField) {
|
|
140
147
|
if (this.statusField) {
|
|
141
|
-
if (!this.qValues
|
|
142
|
-
expression =
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
expression =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
expression =
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
expression =
|
|
148
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
149
|
+
expression = !this.q2Expression
|
|
150
|
+
? q_status_chartC
|
|
151
|
+
: `${q_status_chartC} AND ${this.q2Expression}`;
|
|
152
|
+
}
|
|
153
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
154
|
+
expression = !this.q2Expression
|
|
155
|
+
? query1_status_chartC
|
|
156
|
+
: `${query1_status_chartC} AND ${this.q2Expression}`;
|
|
157
|
+
}
|
|
158
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
159
|
+
expression = !this.q2Expression
|
|
160
|
+
? query12_status_chartC
|
|
161
|
+
: `${query12_status_chartC} AND ${this.q2Expression}`;
|
|
162
|
+
}
|
|
163
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
164
|
+
expression = !this.q2Expression
|
|
165
|
+
? query123_status_chartC
|
|
166
|
+
: `${query123_status_chartC} AND ${this.q2Expression}`;
|
|
158
167
|
}
|
|
159
168
|
}
|
|
160
169
|
else if (!this.statusField) {
|
|
161
|
-
if (!this.qValues
|
|
162
|
-
expression =
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
expression =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
expression =
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
expression =
|
|
170
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
171
|
+
expression = !this.q2Expression
|
|
172
|
+
? q_chartC
|
|
173
|
+
: `${q_chartC} AND ${this.q2Expression}`;
|
|
174
|
+
}
|
|
175
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
176
|
+
expression = !this.q2Expression
|
|
177
|
+
? query1_chartC
|
|
178
|
+
: `${query1_chartC} AND ${this.q2Expression}`;
|
|
179
|
+
}
|
|
180
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
181
|
+
expression = !this.q2Expression
|
|
182
|
+
? query12_chartC
|
|
183
|
+
: `${query12_chartC} AND ${this.q2Expression}`;
|
|
184
|
+
}
|
|
185
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
186
|
+
expression = !this.q2Expression
|
|
187
|
+
? query123_chartC
|
|
188
|
+
: `${query123_chartC} AND ${this.q2Expression}`;
|
|
178
189
|
}
|
|
179
190
|
}
|
|
180
191
|
}
|
|
181
192
|
else if (!this.chartCategoryField) {
|
|
182
193
|
if (this.statusField) {
|
|
183
|
-
if (!this.qValues
|
|
184
|
-
expression =
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
expression =
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
expression =
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
expression =
|
|
194
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
195
|
+
expression = !this.q2Expression
|
|
196
|
+
? q_status
|
|
197
|
+
: `${q_status} AND ${this.q2Expression}`;
|
|
198
|
+
}
|
|
199
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
200
|
+
expression = !this.q2Expression
|
|
201
|
+
? query1_status
|
|
202
|
+
: `${query1_status} AND ${this.q2Expression}`;
|
|
203
|
+
}
|
|
204
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
205
|
+
expression = !this.q2Expression
|
|
206
|
+
? query12_status
|
|
207
|
+
: `${query12_status} AND ${this.q2Expression}`;
|
|
208
|
+
}
|
|
209
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
210
|
+
expression = !this.q2Expression
|
|
211
|
+
? query123_status
|
|
212
|
+
: `${query123_status} AND ${this.q2Expression}`;
|
|
200
213
|
}
|
|
201
214
|
}
|
|
202
215
|
else if (!this.statusField) {
|
|
203
|
-
if (!this.qValues
|
|
204
|
-
expression = "1=1";
|
|
216
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
217
|
+
expression = !this.q2Expression ? "1=1" : this.q2Expression;
|
|
205
218
|
}
|
|
206
|
-
else if (this.qValues
|
|
207
|
-
!this.
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
220
|
+
expression = !this.q2Expression
|
|
221
|
+
? query1
|
|
222
|
+
: `${query1} AND ${this.q2Expression}`;
|
|
210
223
|
}
|
|
211
|
-
else if (this.qValues
|
|
212
|
-
this.
|
|
213
|
-
|
|
214
|
-
|
|
224
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
225
|
+
expression = !this.q2Expression
|
|
226
|
+
? query12
|
|
227
|
+
: `${query12} AND ${this.q2Expression}`;
|
|
215
228
|
}
|
|
216
|
-
else if (this.qValues
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
|
|
229
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
230
|
+
expression = !this.q2Expression
|
|
231
|
+
? query123
|
|
232
|
+
: `${query123} AND ${this.q2Expression}`;
|
|
220
233
|
}
|
|
221
234
|
}
|
|
222
235
|
}
|
|
@@ -231,6 +244,7 @@ class QueryExpressionLayers {
|
|
|
231
244
|
this.status = status;
|
|
232
245
|
this.statusField = statusField;
|
|
233
246
|
this.qExpression = qExpression;
|
|
247
|
+
this.q2Expression = q2Expression;
|
|
234
248
|
}
|
|
235
249
|
}
|
|
236
250
|
exports.default = QueryExpressionLayers;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ interface queryExpressionType {
|
|
|
7
7
|
status?: number | null;
|
|
8
8
|
statusField?: any;
|
|
9
9
|
qExpression?: any;
|
|
10
|
+
q2Expression?: any;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
class QueryExpressionLayers implements queryExpressionType {
|
|
@@ -18,6 +19,7 @@ class QueryExpressionLayers implements queryExpressionType {
|
|
|
18
19
|
status?: number | null;
|
|
19
20
|
statusField?: any;
|
|
20
21
|
qExpression?: any;
|
|
22
|
+
q2Expression?: any;
|
|
21
23
|
|
|
22
24
|
constructor(
|
|
23
25
|
qValues: any,
|
|
@@ -28,6 +30,7 @@ class QueryExpressionLayers implements queryExpressionType {
|
|
|
28
30
|
status: number,
|
|
29
31
|
statusField: any,
|
|
30
32
|
qExpression: any,
|
|
33
|
+
q2Expression: any,
|
|
31
34
|
) {
|
|
32
35
|
this.qValues = qValues;
|
|
33
36
|
this.qFields = qFields;
|
|
@@ -37,25 +40,25 @@ class QueryExpressionLayers implements queryExpressionType {
|
|
|
37
40
|
this.status = status;
|
|
38
41
|
this.statusField = statusField;
|
|
39
42
|
this.qExpression = qExpression;
|
|
43
|
+
this.q2Expression = q2Expression;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
//--- Method ---//
|
|
43
47
|
//--- Query Expression
|
|
44
48
|
queryExpression = () => {
|
|
45
49
|
//--- Basic query expression
|
|
46
|
-
this.qValues;
|
|
47
50
|
const query1 =
|
|
48
|
-
typeof this.qValues
|
|
49
|
-
? `${this.qFields
|
|
50
|
-
: `${this.qFields
|
|
51
|
+
typeof this.qValues[0] === "number"
|
|
52
|
+
? `${this.qFields[0]} = ${this.qValues[0]}`
|
|
53
|
+
: `${this.qFields[0]} = '${this.qValues[0]}'`;
|
|
51
54
|
const query2 =
|
|
52
|
-
typeof this.qValues
|
|
53
|
-
? `${this.qFields
|
|
54
|
-
: `${this.qFields
|
|
55
|
+
typeof this.qValues[1] === "number"
|
|
56
|
+
? `${this.qFields[1]} = ${this.qValues[1]}`
|
|
57
|
+
: `${this.qFields[1]} = '${this.qValues[1]}'`;
|
|
55
58
|
const query3 =
|
|
56
|
-
typeof this.qValues
|
|
57
|
-
? `${this.qFields
|
|
58
|
-
: `${this.qFields
|
|
59
|
+
typeof this.qValues[2] === "number"
|
|
60
|
+
? `${this.qFields[2]} = ${this.qValues[2]}`
|
|
61
|
+
: `${this.qFields[2]} = '${this.qValues[2]}'`;
|
|
59
62
|
const query12 = `${query1} AND ${query2}`;
|
|
60
63
|
const query123 = `${query1} AND ${query2} AND ${query3}`;
|
|
61
64
|
const q_status = `${this.statusField} = ${this.status}`;
|
|
@@ -95,188 +98,154 @@ class QueryExpressionLayers implements queryExpressionType {
|
|
|
95
98
|
if (this.qExpression) {
|
|
96
99
|
if (this.chartCategoryField) {
|
|
97
100
|
if (this.statusField) {
|
|
98
|
-
if (!this.qValues
|
|
99
|
-
expression =
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
!this.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} else if (
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
) {
|
|
111
|
-
expression =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.qValues?.[1] &&
|
|
115
|
-
this.qValues?.[2]
|
|
116
|
-
) {
|
|
117
|
-
expression = query123_status_chartC_qE;
|
|
101
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
102
|
+
expression = !this.q2Expression
|
|
103
|
+
? q_status_chartC_qE
|
|
104
|
+
: `${q_status_chartC_qE} AND ${this.q2Expression}`;
|
|
105
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
106
|
+
expression = !this.q2Expression
|
|
107
|
+
? query1_status_chartC_qE
|
|
108
|
+
: `${query1_status_chartC_qE} AND ${this.q2Expression}`;
|
|
109
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
110
|
+
expression = !this.q2Expression
|
|
111
|
+
? query12_status_chartC_qE
|
|
112
|
+
: `${query12_status_chartC_qE} AND ${this.q2Expression}`;
|
|
113
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
114
|
+
expression = !this.q2Expression
|
|
115
|
+
? query123_status_chartC_qE
|
|
116
|
+
: `${query123_status_chartC_qE} AND ${this.q2Expression}`;
|
|
118
117
|
}
|
|
119
118
|
} else if (!this.statusField) {
|
|
120
|
-
if (!this.qValues
|
|
121
|
-
expression =
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
!this.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
} else if (
|
|
129
|
-
this.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
) {
|
|
133
|
-
expression =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.qValues?.[1] &&
|
|
137
|
-
this.qValues?.[2]
|
|
138
|
-
) {
|
|
139
|
-
expression = query123_chartC_qE;
|
|
119
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
120
|
+
expression = !this.q2Expression
|
|
121
|
+
? q_chartC_qE
|
|
122
|
+
: `${q_chartC_qE} AND ${this.q2Expression}`;
|
|
123
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
124
|
+
expression = !this.q2Expression
|
|
125
|
+
? query1_chartC_qE
|
|
126
|
+
: `${query1_chartC_qE} AND ${this.q2Expression}`;
|
|
127
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
128
|
+
expression = !this.q2Expression
|
|
129
|
+
? query12_chartC_qE
|
|
130
|
+
: `${query12_chartC_qE} AND ${this.q2Expression}`;
|
|
131
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
132
|
+
expression = !this.q2Expression
|
|
133
|
+
? query123_chartC_qE
|
|
134
|
+
: `${query123_chartC_qE} AND ${this.q2Expression}`;
|
|
140
135
|
}
|
|
141
136
|
}
|
|
142
137
|
} else if (!this.chartCategoryField) {
|
|
143
138
|
if (this.statusField) {
|
|
144
|
-
if (!this.qValues
|
|
145
|
-
expression =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
!this.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} else if (
|
|
153
|
-
this.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
) {
|
|
157
|
-
expression =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
this.qValues?.[1] &&
|
|
161
|
-
this.qValues?.[2]
|
|
162
|
-
) {
|
|
163
|
-
expression = query123_status_qE;
|
|
139
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
140
|
+
expression = !this.q2Expression
|
|
141
|
+
? q_status_qE
|
|
142
|
+
: `${q_status_qE} AND ${this.q2Expression}`;
|
|
143
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
144
|
+
expression = !this.q2Expression
|
|
145
|
+
? query1_status_qE
|
|
146
|
+
: `${query1_status_qE} AND ${this.q2Expression}`;
|
|
147
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
148
|
+
expression = !this.q2Expression
|
|
149
|
+
? query12_status_qE
|
|
150
|
+
: `${query12_status_qE} AND ${this.q2Expression}`;
|
|
151
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
152
|
+
expression = !this.q2Expression
|
|
153
|
+
? query123_status_qE
|
|
154
|
+
: `${query123_status_qE} AND ${this.q2Expression}`;
|
|
164
155
|
}
|
|
165
156
|
} else if (!this.statusField) {
|
|
166
|
-
if (!this.qValues
|
|
167
|
-
expression = this.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
!this.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
} else if (
|
|
175
|
-
this.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
) {
|
|
179
|
-
expression =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
this.qValues?.[1] &&
|
|
183
|
-
this.qValues?.[2]
|
|
184
|
-
) {
|
|
185
|
-
expression = query123_qE;
|
|
157
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
158
|
+
expression = !this.q2Expression
|
|
159
|
+
? this.qExpression
|
|
160
|
+
: `${this.qExpression} AND ${this.q2Expression}`;
|
|
161
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
162
|
+
expression = !this.q2Expression
|
|
163
|
+
? query1_qE
|
|
164
|
+
: `${query1_qE} AND ${this.q2Expression}`;
|
|
165
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
166
|
+
expression = !this.q2Expression
|
|
167
|
+
? query12_qE
|
|
168
|
+
: `${query12_qE} AND ${this.q2Expression}`;
|
|
169
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
170
|
+
expression = !this.q2Expression
|
|
171
|
+
? query123_qE
|
|
172
|
+
: `${query123_qE} AND ${this.q2Expression}`;
|
|
186
173
|
}
|
|
187
174
|
}
|
|
188
175
|
}
|
|
189
176
|
} else if (!this.qExpression) {
|
|
190
177
|
if (this.chartCategoryField) {
|
|
191
178
|
if (this.statusField) {
|
|
192
|
-
if (!this.qValues
|
|
193
|
-
expression =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
!this.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
} else if (
|
|
201
|
-
this.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
) {
|
|
205
|
-
expression =
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this.qValues?.[1] &&
|
|
209
|
-
this.qValues?.[2]
|
|
210
|
-
) {
|
|
211
|
-
expression = query123_status_chartC;
|
|
179
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
180
|
+
expression = !this.q2Expression
|
|
181
|
+
? q_status_chartC
|
|
182
|
+
: `${q_status_chartC} AND ${this.q2Expression}`;
|
|
183
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
184
|
+
expression = !this.q2Expression
|
|
185
|
+
? query1_status_chartC
|
|
186
|
+
: `${query1_status_chartC} AND ${this.q2Expression}`;
|
|
187
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
188
|
+
expression = !this.q2Expression
|
|
189
|
+
? query12_status_chartC
|
|
190
|
+
: `${query12_status_chartC} AND ${this.q2Expression}`;
|
|
191
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
192
|
+
expression = !this.q2Expression
|
|
193
|
+
? query123_status_chartC
|
|
194
|
+
: `${query123_status_chartC} AND ${this.q2Expression}`;
|
|
212
195
|
}
|
|
213
196
|
} else if (!this.statusField) {
|
|
214
|
-
if (!this.qValues
|
|
215
|
-
expression =
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
!this.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
} else if (
|
|
223
|
-
this.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
) {
|
|
227
|
-
expression =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
this.qValues?.[1] &&
|
|
231
|
-
this.qValues?.[2]
|
|
232
|
-
) {
|
|
233
|
-
expression = query123_chartC;
|
|
197
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
198
|
+
expression = !this.q2Expression
|
|
199
|
+
? q_chartC
|
|
200
|
+
: `${q_chartC} AND ${this.q2Expression}`;
|
|
201
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
202
|
+
expression = !this.q2Expression
|
|
203
|
+
? query1_chartC
|
|
204
|
+
: `${query1_chartC} AND ${this.q2Expression}`;
|
|
205
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
206
|
+
expression = !this.q2Expression
|
|
207
|
+
? query12_chartC
|
|
208
|
+
: `${query12_chartC} AND ${this.q2Expression}`;
|
|
209
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
210
|
+
expression = !this.q2Expression
|
|
211
|
+
? query123_chartC
|
|
212
|
+
: `${query123_chartC} AND ${this.q2Expression}`;
|
|
234
213
|
}
|
|
235
214
|
}
|
|
236
215
|
} else if (!this.chartCategoryField) {
|
|
237
216
|
if (this.statusField) {
|
|
238
|
-
if (!this.qValues
|
|
239
|
-
expression =
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
!this.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
} else if (
|
|
247
|
-
this.
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
) {
|
|
251
|
-
expression =
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
this.qValues?.[1] &&
|
|
255
|
-
this.qValues?.[2]
|
|
256
|
-
) {
|
|
257
|
-
expression = query123_status;
|
|
217
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
218
|
+
expression = !this.q2Expression
|
|
219
|
+
? q_status
|
|
220
|
+
: `${q_status} AND ${this.q2Expression}`;
|
|
221
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
222
|
+
expression = !this.q2Expression
|
|
223
|
+
? query1_status
|
|
224
|
+
: `${query1_status} AND ${this.q2Expression}`;
|
|
225
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
226
|
+
expression = !this.q2Expression
|
|
227
|
+
? query12_status
|
|
228
|
+
: `${query12_status} AND ${this.q2Expression}`;
|
|
229
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
230
|
+
expression = !this.q2Expression
|
|
231
|
+
? query123_status
|
|
232
|
+
: `${query123_status} AND ${this.q2Expression}`;
|
|
258
233
|
}
|
|
259
234
|
} else if (!this.statusField) {
|
|
260
|
-
if (!this.qValues
|
|
261
|
-
expression = "1=1";
|
|
262
|
-
} else if (
|
|
263
|
-
this.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
) {
|
|
267
|
-
expression =
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
!this.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
} else if (
|
|
275
|
-
this.qValues?.[0] &&
|
|
276
|
-
this.qValues?.[1] &&
|
|
277
|
-
this.qValues?.[2]
|
|
278
|
-
) {
|
|
279
|
-
expression = query123;
|
|
235
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
236
|
+
expression = !this.q2Expression ? "1=1" : this.q2Expression;
|
|
237
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
238
|
+
expression = !this.q2Expression
|
|
239
|
+
? query1
|
|
240
|
+
: `${query1} AND ${this.q2Expression}`;
|
|
241
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
242
|
+
expression = !this.q2Expression
|
|
243
|
+
? query12
|
|
244
|
+
: `${query12} AND ${this.q2Expression}`;
|
|
245
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
246
|
+
expression = !this.q2Expression
|
|
247
|
+
? query123
|
|
248
|
+
: `${query123} AND ${this.q2Expression}`;
|
|
280
249
|
}
|
|
281
250
|
}
|
|
282
251
|
}
|