query-layers-expression 1.0.7 → 1.0.9
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 +1 -1
- package/build/index.js +76 -76
- package/package.json +1 -1
- package/src/index.ts +76 -85
package/build/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ declare class QueryExpressionLayers implements queryExpressionType {
|
|
|
18
18
|
statusField?: any;
|
|
19
19
|
qExpression?: any;
|
|
20
20
|
constructor(qValues: any, qFields: any, chartCategory: any, chartCategoryField: any, chartCategoryType: "number" | "string", status: number, statusField: any, qExpression: any);
|
|
21
|
-
queryExpression: (
|
|
21
|
+
queryExpression: () => string;
|
|
22
22
|
}
|
|
23
23
|
export default QueryExpressionLayers;
|
package/build/index.js
CHANGED
|
@@ -4,23 +4,23 @@ class QueryExpressionLayers {
|
|
|
4
4
|
constructor(qValues, qFields, chartCategory, chartCategoryField, chartCategoryType, status, statusField, qExpression) {
|
|
5
5
|
//--- Method ---//
|
|
6
6
|
//--- Query Expression
|
|
7
|
-
this.queryExpression = (
|
|
7
|
+
this.queryExpression = () => {
|
|
8
8
|
//--- Basic query expression
|
|
9
|
-
const query1 = typeof qValues
|
|
10
|
-
? `${qFields
|
|
11
|
-
: `${qFields
|
|
12
|
-
const query2 = typeof qValues
|
|
13
|
-
? `${qFields
|
|
14
|
-
: `${qFields
|
|
15
|
-
const query3 = typeof qValues
|
|
16
|
-
? `${qFields
|
|
17
|
-
: `${qFields
|
|
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]}'`;
|
|
18
18
|
const query12 = `${query1} AND ${query2}`;
|
|
19
19
|
const query123 = `${query1} AND ${query2} AND ${query3}`;
|
|
20
|
-
const q_status = `${statusField} = ${status}`;
|
|
21
|
-
const q_chartC = chartCategoryType === "string"
|
|
22
|
-
? `${chartCategoryField} = '${chartCategory}'`
|
|
23
|
-
: `${chartCategoryField} = ${chartCategory}`;
|
|
20
|
+
const q_status = `${this.statusField} = ${this.status}`;
|
|
21
|
+
const q_chartC = this.chartCategoryType === "string"
|
|
22
|
+
? `${this.chartCategoryField} = '${this.chartCategory}'`
|
|
23
|
+
: `${this.chartCategoryField} = ${this.chartCategory}`;
|
|
24
24
|
const q_status_chartC = `${q_status} AND ${q_chartC}`;
|
|
25
25
|
const query1_chartC = `${query1} AND ${q_chartC}`;
|
|
26
26
|
const query12_chartC = `${query12} AND ${q_chartC}`;
|
|
@@ -32,141 +32,141 @@ class QueryExpressionLayers {
|
|
|
32
32
|
const query12_status_chartC = `${query12_status} AND ${q_chartC}`;
|
|
33
33
|
const query123_status_chartC = `${query123_status} AND ${q_chartC}`;
|
|
34
34
|
//--- With qExpression
|
|
35
|
-
const query1_qE = `${query1} AND ${qExpression}`;
|
|
36
|
-
const query12_qE = `${query12} AND ${qExpression}`;
|
|
37
|
-
const query123_qE = `${query123} AND ${qExpression}`;
|
|
38
|
-
const q_status_qE = `${q_status} AND ${qExpression}`;
|
|
39
|
-
const q_chartC_qE = `${q_chartC} AND ${qExpression}`;
|
|
40
|
-
const q_status_chartC_qE = `${q_status_chartC} AND ${qExpression}`;
|
|
41
|
-
const query1_chartC_qE = `${query1_chartC} AND ${qExpression}`;
|
|
42
|
-
const query12_chartC_qE = `${query12_chartC} AND ${qExpression}`;
|
|
43
|
-
const query123_chartC_qE = `${query123_chartC} AND ${qExpression}`;
|
|
44
|
-
const query1_status_qE = `${query1_status} AND ${qExpression}`;
|
|
45
|
-
const query12_status_qE = `${query12_status} AND ${qExpression}`;
|
|
46
|
-
const query123_status_qE = `${query123_status} AND ${qExpression}`;
|
|
47
|
-
const query1_status_chartC_qE = `${query1_status_chartC} AND ${qExpression}`;
|
|
48
|
-
const query12_status_chartC_qE = `${query12_status_chartC} AND ${qExpression}`;
|
|
49
|
-
const query123_status_chartC_qE = `${query123_status_chartC} AND ${qExpression}`;
|
|
35
|
+
const query1_qE = `${query1} AND ${this.qExpression}`;
|
|
36
|
+
const query12_qE = `${query12} AND ${this.qExpression}`;
|
|
37
|
+
const query123_qE = `${query123} AND ${this.qExpression}`;
|
|
38
|
+
const q_status_qE = `${q_status} AND ${this.qExpression}`;
|
|
39
|
+
const q_chartC_qE = `${q_chartC} AND ${this.qExpression}`;
|
|
40
|
+
const q_status_chartC_qE = `${q_status_chartC} AND ${this.qExpression}`;
|
|
41
|
+
const query1_chartC_qE = `${query1_chartC} AND ${this.qExpression}`;
|
|
42
|
+
const query12_chartC_qE = `${query12_chartC} AND ${this.qExpression}`;
|
|
43
|
+
const query123_chartC_qE = `${query123_chartC} AND ${this.qExpression}`;
|
|
44
|
+
const query1_status_qE = `${query1_status} AND ${this.qExpression}`;
|
|
45
|
+
const query12_status_qE = `${query12_status} AND ${this.qExpression}`;
|
|
46
|
+
const query123_status_qE = `${query123_status} AND ${this.qExpression}`;
|
|
47
|
+
const query1_status_chartC_qE = `${query1_status_chartC} AND ${this.qExpression}`;
|
|
48
|
+
const query12_status_chartC_qE = `${query12_status_chartC} AND ${this.qExpression}`;
|
|
49
|
+
const query123_status_chartC_qE = `${query123_status_chartC} AND ${this.qExpression}`;
|
|
50
50
|
let expression = "";
|
|
51
|
-
if (qExpression) {
|
|
52
|
-
if (chartCategoryField) {
|
|
53
|
-
if (statusField) {
|
|
54
|
-
if (!qValues
|
|
51
|
+
if (this.qExpression) {
|
|
52
|
+
if (this.chartCategoryField) {
|
|
53
|
+
if (this.statusField) {
|
|
54
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
55
55
|
expression = q_status_chartC_qE;
|
|
56
56
|
}
|
|
57
|
-
else if (qValues
|
|
57
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
58
58
|
expression = query1_status_chartC_qE;
|
|
59
59
|
}
|
|
60
|
-
else if (qValues
|
|
60
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
61
61
|
expression = query12_status_chartC_qE;
|
|
62
62
|
}
|
|
63
|
-
else if (qValues
|
|
63
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
64
64
|
expression = query123_status_chartC_qE;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
else if (!statusField) {
|
|
68
|
-
if (!qValues
|
|
67
|
+
else if (!this.statusField) {
|
|
68
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
69
69
|
expression = q_chartC_qE;
|
|
70
70
|
}
|
|
71
|
-
else if (qValues
|
|
71
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
72
72
|
expression = query1_chartC_qE;
|
|
73
73
|
}
|
|
74
|
-
else if (qValues
|
|
74
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
75
75
|
expression = query12_chartC_qE;
|
|
76
76
|
}
|
|
77
|
-
else if (qValues
|
|
77
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
78
78
|
expression = query123_chartC_qE;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
else if (!chartCategoryField) {
|
|
83
|
-
if (statusField) {
|
|
84
|
-
if (!qValues
|
|
82
|
+
else if (!this.chartCategoryField) {
|
|
83
|
+
if (this.statusField) {
|
|
84
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
85
85
|
expression = q_status_qE;
|
|
86
86
|
}
|
|
87
|
-
else if (qValues
|
|
87
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
88
88
|
expression = query1_status_qE;
|
|
89
89
|
}
|
|
90
|
-
else if (qValues
|
|
90
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
91
91
|
expression = query12_status_qE;
|
|
92
92
|
}
|
|
93
|
-
else if (qValues
|
|
93
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
94
94
|
expression = query123_status_qE;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
else if (!statusField) {
|
|
98
|
-
if (!qValues
|
|
99
|
-
expression = qExpression;
|
|
97
|
+
else if (!this.statusField) {
|
|
98
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
99
|
+
expression = this.qExpression;
|
|
100
100
|
}
|
|
101
|
-
else if (qValues
|
|
101
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
102
102
|
expression = query1_qE;
|
|
103
103
|
}
|
|
104
|
-
else if (qValues
|
|
104
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
105
105
|
expression = query12_qE;
|
|
106
106
|
}
|
|
107
|
-
else if (qValues
|
|
107
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
108
108
|
expression = query123_qE;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
else if (!qExpression) {
|
|
114
|
-
if (chartCategoryField) {
|
|
115
|
-
if (statusField) {
|
|
116
|
-
if (!qValues
|
|
113
|
+
else if (!this.qExpression) {
|
|
114
|
+
if (this.chartCategoryField) {
|
|
115
|
+
if (this.statusField) {
|
|
116
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
117
117
|
expression = q_status_chartC;
|
|
118
118
|
}
|
|
119
|
-
else if (qValues
|
|
119
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
120
120
|
expression = query1_status_chartC;
|
|
121
121
|
}
|
|
122
|
-
else if (qValues
|
|
122
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
123
123
|
expression = query12_status_chartC;
|
|
124
124
|
}
|
|
125
|
-
else if (qValues
|
|
125
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
126
126
|
expression = query123_status_chartC;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
else if (!statusField) {
|
|
130
|
-
if (!qValues
|
|
129
|
+
else if (!this.statusField) {
|
|
130
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
131
131
|
expression = q_chartC;
|
|
132
132
|
}
|
|
133
|
-
else if (qValues
|
|
133
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
134
134
|
expression = query1_chartC;
|
|
135
135
|
}
|
|
136
|
-
else if (qValues
|
|
136
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
137
137
|
expression = query12_chartC;
|
|
138
138
|
}
|
|
139
|
-
else if (qValues
|
|
139
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
140
140
|
expression = query123_chartC;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
else if (!chartCategoryField) {
|
|
145
|
-
if (statusField) {
|
|
146
|
-
if (!qValues
|
|
144
|
+
else if (!this.chartCategoryField) {
|
|
145
|
+
if (this.statusField) {
|
|
146
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
147
147
|
expression = q_status;
|
|
148
148
|
}
|
|
149
|
-
else if (qValues
|
|
149
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
150
150
|
expression = query1_status;
|
|
151
151
|
}
|
|
152
|
-
else if (qValues
|
|
152
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
153
153
|
expression = query12_status;
|
|
154
154
|
}
|
|
155
|
-
else if (qValues
|
|
155
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
156
156
|
expression = query123_status;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
else if (!statusField) {
|
|
160
|
-
if (!qValues
|
|
159
|
+
else if (!this.statusField) {
|
|
160
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
161
161
|
expression = "1=1";
|
|
162
162
|
}
|
|
163
|
-
else if (qValues
|
|
163
|
+
else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
164
164
|
expression = query1;
|
|
165
165
|
}
|
|
166
|
-
else if (qValues
|
|
166
|
+
else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
167
167
|
expression = query12;
|
|
168
168
|
}
|
|
169
|
-
else if (qValues
|
|
169
|
+
else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
170
170
|
expression = query123;
|
|
171
171
|
}
|
|
172
172
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -41,36 +41,27 @@ class QueryExpressionLayers implements queryExpressionType {
|
|
|
41
41
|
|
|
42
42
|
//--- Method ---//
|
|
43
43
|
//--- Query Expression
|
|
44
|
-
queryExpression = ({
|
|
45
|
-
qValues,
|
|
46
|
-
qFields,
|
|
47
|
-
chartCategory,
|
|
48
|
-
chartCategoryField,
|
|
49
|
-
chartCategoryType,
|
|
50
|
-
status,
|
|
51
|
-
statusField,
|
|
52
|
-
qExpression,
|
|
53
|
-
}: queryExpressionType) => {
|
|
44
|
+
queryExpression = () => {
|
|
54
45
|
//--- Basic query expression
|
|
55
46
|
const query1 =
|
|
56
|
-
typeof qValues
|
|
57
|
-
? `${qFields
|
|
58
|
-
: `${qFields
|
|
47
|
+
typeof this.qValues[0] === "number"
|
|
48
|
+
? `${this.qFields[0]} = ${this.qValues[0]}`
|
|
49
|
+
: `${this.qFields[0]} = '${this.qValues[0]}'`;
|
|
59
50
|
const query2 =
|
|
60
|
-
typeof qValues
|
|
61
|
-
? `${qFields
|
|
62
|
-
: `${qFields
|
|
51
|
+
typeof this.qValues[1] === "number"
|
|
52
|
+
? `${this.qFields[1]} = ${this.qValues[1]}`
|
|
53
|
+
: `${this.qFields[1]} = '${this.qValues[1]}'`;
|
|
63
54
|
const query3 =
|
|
64
|
-
typeof qValues
|
|
65
|
-
? `${qFields
|
|
66
|
-
: `${qFields
|
|
55
|
+
typeof this.qValues[2] === "number"
|
|
56
|
+
? `${this.qFields[2]} = ${this.qValues[2]}`
|
|
57
|
+
: `${this.qFields[2]} = '${this.qValues[2]}'`;
|
|
67
58
|
const query12 = `${query1} AND ${query2}`;
|
|
68
59
|
const query123 = `${query1} AND ${query2} AND ${query3}`;
|
|
69
|
-
const q_status = `${statusField} = ${status}`;
|
|
60
|
+
const q_status = `${this.statusField} = ${this.status}`;
|
|
70
61
|
const q_chartC =
|
|
71
|
-
chartCategoryType === "string"
|
|
72
|
-
? `${chartCategoryField} = '${chartCategory}'`
|
|
73
|
-
: `${chartCategoryField} = ${chartCategory}`;
|
|
62
|
+
this.chartCategoryType === "string"
|
|
63
|
+
? `${this.chartCategoryField} = '${this.chartCategory}'`
|
|
64
|
+
: `${this.chartCategoryField} = ${this.chartCategory}`;
|
|
74
65
|
const q_status_chartC = `${q_status} AND ${q_chartC}`;
|
|
75
66
|
const query1_chartC = `${query1} AND ${q_chartC}`;
|
|
76
67
|
const query12_chartC = `${query12} AND ${q_chartC}`;
|
|
@@ -83,111 +74,111 @@ class QueryExpressionLayers implements queryExpressionType {
|
|
|
83
74
|
const query123_status_chartC = `${query123_status} AND ${q_chartC}`;
|
|
84
75
|
|
|
85
76
|
//--- With qExpression
|
|
86
|
-
const query1_qE = `${query1} AND ${qExpression}`;
|
|
87
|
-
const query12_qE = `${query12} AND ${qExpression}`;
|
|
88
|
-
const query123_qE = `${query123} AND ${qExpression}`;
|
|
89
|
-
const q_status_qE = `${q_status} AND ${qExpression}`;
|
|
90
|
-
const q_chartC_qE = `${q_chartC} AND ${qExpression}`;
|
|
91
|
-
const q_status_chartC_qE = `${q_status_chartC} AND ${qExpression}`;
|
|
92
|
-
const query1_chartC_qE = `${query1_chartC} AND ${qExpression}`;
|
|
93
|
-
const query12_chartC_qE = `${query12_chartC} AND ${qExpression}`;
|
|
94
|
-
const query123_chartC_qE = `${query123_chartC} AND ${qExpression}`;
|
|
95
|
-
const query1_status_qE = `${query1_status} AND ${qExpression}`;
|
|
96
|
-
const query12_status_qE = `${query12_status} AND ${qExpression}`;
|
|
97
|
-
const query123_status_qE = `${query123_status} AND ${qExpression}`;
|
|
98
|
-
const query1_status_chartC_qE = `${query1_status_chartC} AND ${qExpression}`;
|
|
99
|
-
const query12_status_chartC_qE = `${query12_status_chartC} AND ${qExpression}`;
|
|
100
|
-
const query123_status_chartC_qE = `${query123_status_chartC} AND ${qExpression}`;
|
|
77
|
+
const query1_qE = `${query1} AND ${this.qExpression}`;
|
|
78
|
+
const query12_qE = `${query12} AND ${this.qExpression}`;
|
|
79
|
+
const query123_qE = `${query123} AND ${this.qExpression}`;
|
|
80
|
+
const q_status_qE = `${q_status} AND ${this.qExpression}`;
|
|
81
|
+
const q_chartC_qE = `${q_chartC} AND ${this.qExpression}`;
|
|
82
|
+
const q_status_chartC_qE = `${q_status_chartC} AND ${this.qExpression}`;
|
|
83
|
+
const query1_chartC_qE = `${query1_chartC} AND ${this.qExpression}`;
|
|
84
|
+
const query12_chartC_qE = `${query12_chartC} AND ${this.qExpression}`;
|
|
85
|
+
const query123_chartC_qE = `${query123_chartC} AND ${this.qExpression}`;
|
|
86
|
+
const query1_status_qE = `${query1_status} AND ${this.qExpression}`;
|
|
87
|
+
const query12_status_qE = `${query12_status} AND ${this.qExpression}`;
|
|
88
|
+
const query123_status_qE = `${query123_status} AND ${this.qExpression}`;
|
|
89
|
+
const query1_status_chartC_qE = `${query1_status_chartC} AND ${this.qExpression}`;
|
|
90
|
+
const query12_status_chartC_qE = `${query12_status_chartC} AND ${this.qExpression}`;
|
|
91
|
+
const query123_status_chartC_qE = `${query123_status_chartC} AND ${this.qExpression}`;
|
|
101
92
|
|
|
102
93
|
let expression = "";
|
|
103
|
-
if (qExpression) {
|
|
104
|
-
if (chartCategoryField) {
|
|
105
|
-
if (statusField) {
|
|
106
|
-
if (!qValues
|
|
94
|
+
if (this.qExpression) {
|
|
95
|
+
if (this.chartCategoryField) {
|
|
96
|
+
if (this.statusField) {
|
|
97
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
107
98
|
expression = q_status_chartC_qE;
|
|
108
|
-
} else if (qValues
|
|
99
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
109
100
|
expression = query1_status_chartC_qE;
|
|
110
|
-
} else if (qValues
|
|
101
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
111
102
|
expression = query12_status_chartC_qE;
|
|
112
|
-
} else if (qValues
|
|
103
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
113
104
|
expression = query123_status_chartC_qE;
|
|
114
105
|
}
|
|
115
|
-
} else if (!statusField) {
|
|
116
|
-
if (!qValues
|
|
106
|
+
} else if (!this.statusField) {
|
|
107
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
117
108
|
expression = q_chartC_qE;
|
|
118
|
-
} else if (qValues
|
|
109
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
119
110
|
expression = query1_chartC_qE;
|
|
120
|
-
} else if (qValues
|
|
111
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
121
112
|
expression = query12_chartC_qE;
|
|
122
|
-
} else if (qValues
|
|
113
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
123
114
|
expression = query123_chartC_qE;
|
|
124
115
|
}
|
|
125
116
|
}
|
|
126
|
-
} else if (!chartCategoryField) {
|
|
127
|
-
if (statusField) {
|
|
128
|
-
if (!qValues
|
|
117
|
+
} else if (!this.chartCategoryField) {
|
|
118
|
+
if (this.statusField) {
|
|
119
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
129
120
|
expression = q_status_qE;
|
|
130
|
-
} else if (qValues
|
|
121
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
131
122
|
expression = query1_status_qE;
|
|
132
|
-
} else if (qValues
|
|
123
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
133
124
|
expression = query12_status_qE;
|
|
134
|
-
} else if (qValues
|
|
125
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
135
126
|
expression = query123_status_qE;
|
|
136
127
|
}
|
|
137
|
-
} else if (!statusField) {
|
|
138
|
-
if (!qValues
|
|
139
|
-
expression = qExpression;
|
|
140
|
-
} else if (qValues
|
|
128
|
+
} else if (!this.statusField) {
|
|
129
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
130
|
+
expression = this.qExpression;
|
|
131
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
141
132
|
expression = query1_qE;
|
|
142
|
-
} else if (qValues
|
|
133
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
143
134
|
expression = query12_qE;
|
|
144
|
-
} else if (qValues
|
|
135
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
145
136
|
expression = query123_qE;
|
|
146
137
|
}
|
|
147
138
|
}
|
|
148
139
|
}
|
|
149
|
-
} else if (!qExpression) {
|
|
150
|
-
if (chartCategoryField) {
|
|
151
|
-
if (statusField) {
|
|
152
|
-
if (!qValues
|
|
140
|
+
} else if (!this.qExpression) {
|
|
141
|
+
if (this.chartCategoryField) {
|
|
142
|
+
if (this.statusField) {
|
|
143
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
153
144
|
expression = q_status_chartC;
|
|
154
|
-
} else if (qValues
|
|
145
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
155
146
|
expression = query1_status_chartC;
|
|
156
|
-
} else if (qValues
|
|
147
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
157
148
|
expression = query12_status_chartC;
|
|
158
|
-
} else if (qValues
|
|
149
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
159
150
|
expression = query123_status_chartC;
|
|
160
151
|
}
|
|
161
|
-
} else if (!statusField) {
|
|
162
|
-
if (!qValues
|
|
152
|
+
} else if (!this.statusField) {
|
|
153
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
163
154
|
expression = q_chartC;
|
|
164
|
-
} else if (qValues
|
|
155
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
165
156
|
expression = query1_chartC;
|
|
166
|
-
} else if (qValues
|
|
157
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
167
158
|
expression = query12_chartC;
|
|
168
|
-
} else if (qValues
|
|
159
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
169
160
|
expression = query123_chartC;
|
|
170
161
|
}
|
|
171
162
|
}
|
|
172
|
-
} else if (!chartCategoryField) {
|
|
173
|
-
if (statusField) {
|
|
174
|
-
if (!qValues
|
|
163
|
+
} else if (!this.chartCategoryField) {
|
|
164
|
+
if (this.statusField) {
|
|
165
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
175
166
|
expression = q_status;
|
|
176
|
-
} else if (qValues
|
|
167
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
177
168
|
expression = query1_status;
|
|
178
|
-
} else if (qValues
|
|
169
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
179
170
|
expression = query12_status;
|
|
180
|
-
} else if (qValues
|
|
171
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
181
172
|
expression = query123_status;
|
|
182
173
|
}
|
|
183
|
-
} else if (!statusField) {
|
|
184
|
-
if (!qValues
|
|
174
|
+
} else if (!this.statusField) {
|
|
175
|
+
if (!this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
185
176
|
expression = "1=1";
|
|
186
|
-
} else if (qValues
|
|
177
|
+
} else if (this.qValues[0] && !this.qValues[1] && !this.qValues[2]) {
|
|
187
178
|
expression = query1;
|
|
188
|
-
} else if (qValues
|
|
179
|
+
} else if (this.qValues[0] && this.qValues[1] && !this.qValues[2]) {
|
|
189
180
|
expression = query12;
|
|
190
|
-
} else if (qValues
|
|
181
|
+
} else if (this.qValues[0] && this.qValues[1] && this.qValues[2]) {
|
|
191
182
|
expression = query123;
|
|
192
183
|
}
|
|
193
184
|
}
|