exodus-framework 2.0.748 → 2.0.750
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/utils/database.js +5 -5
- package/package.json +1 -1
package/lib/utils/database.js
CHANGED
@@ -85,15 +85,15 @@ function processDateCondition(key, cond) {
|
|
85
85
|
}
|
86
86
|
if (cond.gt !== undefined) {
|
87
87
|
simpleWhere[0] = _sequelize.Op.and;
|
88
|
-
simpleWhere[1] = [(0, _sequelize.literal)(`DATE(${key})
|
88
|
+
simpleWhere[1] = [(0, _sequelize.literal)(`DATE(${key}) > '${cond.gt}'`)];
|
89
89
|
}
|
90
90
|
if (cond.lt !== undefined) {
|
91
91
|
simpleWhere[0] = _sequelize.Op.and;
|
92
|
-
simpleWhere[1] = [(0, _sequelize.literal)(`DATE(${key})
|
92
|
+
simpleWhere[1] = [(0, _sequelize.literal)(`DATE(${key}) < '${cond.lt}'`)];
|
93
93
|
}
|
94
94
|
if (cond.between !== undefined) {
|
95
95
|
simpleWhere[1] = {
|
96
|
-
[_sequelize.Op.between]: cond.
|
96
|
+
[_sequelize.Op.between]: cond.between.map(d => new Date(d))
|
97
97
|
};
|
98
98
|
}
|
99
99
|
if (cond.notBetween !== undefined) {
|
@@ -103,12 +103,12 @@ function processDateCondition(key, cond) {
|
|
103
103
|
}
|
104
104
|
if (cond.in !== undefined) {
|
105
105
|
simpleWhere[1] = {
|
106
|
-
[_sequelize.Op.in]: cond.
|
106
|
+
[_sequelize.Op.in]: cond.in.map(d => new Date(d))
|
107
107
|
};
|
108
108
|
}
|
109
109
|
if (cond.notIn !== undefined) {
|
110
110
|
simpleWhere[1] = {
|
111
|
-
[_sequelize.Op.notIn]: cond.
|
111
|
+
[_sequelize.Op.notIn]: cond.notIn.map(d => new Date(d))
|
112
112
|
};
|
113
113
|
}
|
114
114
|
return simpleWhere;
|