axe-api 0.20.0-rc21 → 0.20.0-rc23
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/src/Enums.d.ts
CHANGED
package/build/src/Enums.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.TimestampColumns = exports.SortTypes = exports.Relationships = exports.L
|
|
|
4
4
|
var ConditionTypes;
|
|
5
5
|
(function (ConditionTypes) {
|
|
6
6
|
ConditionTypes["NotNull"] = "NotNull";
|
|
7
|
-
ConditionTypes["Null"] = "
|
|
7
|
+
ConditionTypes["Null"] = "Null";
|
|
8
8
|
ConditionTypes["="] = "=";
|
|
9
9
|
ConditionTypes["<>"] = "<>";
|
|
10
10
|
ConditionTypes[">"] = ">";
|
|
@@ -191,15 +191,15 @@ const getRelatedData = (data, withArray, model, modelList, database, handler, re
|
|
|
191
191
|
// };
|
|
192
192
|
// }),
|
|
193
193
|
// ];
|
|
194
|
-
console.log([
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
]);
|
|
194
|
+
// console.log([
|
|
195
|
+
// ...workList.map((relationship) => {
|
|
196
|
+
// return {
|
|
197
|
+
// relationship,
|
|
198
|
+
// fields: [],
|
|
199
|
+
// children: [],
|
|
200
|
+
// };
|
|
201
|
+
// }),
|
|
202
|
+
// ]);
|
|
203
203
|
// We should check if the column is defined on the table.
|
|
204
204
|
const undefinedColumns = selectColumns.filter((column) => !foreignModel.columnNames.includes(column));
|
|
205
205
|
if (undefinedColumns.length > 0) {
|
|
@@ -32,7 +32,7 @@ exports.default = (pack) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
32
32
|
query }));
|
|
33
33
|
const requestMethod = req.method;
|
|
34
34
|
const fillables = model.instance.getFillableFields(requestMethod);
|
|
35
|
-
const formData = (0, Helpers_1.getMergedFormData)(req, fillables);
|
|
35
|
+
const formData = Object.assign(Object.assign({}, item), (0, Helpers_1.getMergedFormData)(req, fillables));
|
|
36
36
|
const validationRules = model.instance.getValidationRules(requestMethod);
|
|
37
37
|
if (validationRules) {
|
|
38
38
|
const validation = new validatorjs_1.default(formData, validationRules);
|
|
@@ -301,13 +301,16 @@ class QueryService {
|
|
|
301
301
|
this.applySpecialCondition(where, "$between", Enums_1.ConditionTypes.Between);
|
|
302
302
|
this.applySpecialCondition(where, "$notBetween", Enums_1.ConditionTypes.NotBetween);
|
|
303
303
|
}
|
|
304
|
-
if (where.condition ===
|
|
304
|
+
if (where.condition === Enums_1.ConditionTypes.In ||
|
|
305
|
+
where.condition === Enums_1.ConditionTypes.NotIn) {
|
|
305
306
|
where.value = where.value.split(",");
|
|
306
307
|
}
|
|
307
|
-
if (where.condition ===
|
|
308
|
+
if (where.condition === Enums_1.ConditionTypes.Between ||
|
|
309
|
+
where.condition === Enums_1.ConditionTypes.NotBetween) {
|
|
308
310
|
where.value = where.value.split(":");
|
|
309
311
|
}
|
|
310
|
-
if (where.condition ===
|
|
312
|
+
if (where.condition === Enums_1.ConditionTypes.LIKE ||
|
|
313
|
+
where.condition === Enums_1.ConditionTypes["NOT LIKE"]) {
|
|
311
314
|
where.value = where.value.replace(/\*/g, "%");
|
|
312
315
|
}
|
|
313
316
|
// This means that the condition is related with another table
|
package/package.json
CHANGED