c2-mongoose 2.1.300 → 2.1.302
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.
|
@@ -273,13 +273,16 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
273
273
|
key = key.replace("notIn", "");
|
|
274
274
|
condition[key] = { $nin: value };
|
|
275
275
|
}
|
|
276
|
+
else if (key.endsWith("NotIn")) {
|
|
277
|
+
key = key.replace("NotIn", "");
|
|
278
|
+
condition[key] = { $nin: value };
|
|
279
|
+
}
|
|
280
|
+
else if (key.endsWith("IsEmpty")) {
|
|
281
|
+
key = key.replace("IsEmpty", "");
|
|
282
|
+
condition[key] = { $size: value ? 0 : { $gte: 1 } };
|
|
283
|
+
}
|
|
276
284
|
else {
|
|
277
|
-
|
|
278
|
-
condition[key] = { $in: value };
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
condition[key] = { $size: 0 };
|
|
282
|
-
}
|
|
285
|
+
condition[key] = { $in: value };
|
|
283
286
|
}
|
|
284
287
|
}
|
|
285
288
|
else if (Array.isArray(value)) {
|
package/package.json
CHANGED
package/src/flow/SearcherFlow.ts
CHANGED
|
@@ -251,12 +251,14 @@ class SearcherFlow<D> {
|
|
|
251
251
|
if (key.startsWith("notIn")) {
|
|
252
252
|
key = key.replace("notIn", "");
|
|
253
253
|
condition[key] = { $nin: value };
|
|
254
|
+
} else if (key.endsWith("NotIn")) {
|
|
255
|
+
key = key.replace("NotIn", "");
|
|
256
|
+
condition[key] = { $nin: value };
|
|
257
|
+
} else if (key.endsWith("IsEmpty")) {
|
|
258
|
+
key = key.replace("IsEmpty", "");
|
|
259
|
+
condition[key] = { $size: value ? 0 : { $gte: 1 } };
|
|
254
260
|
} else {
|
|
255
|
-
|
|
256
|
-
condition[key] = { $in: value };
|
|
257
|
-
} else {
|
|
258
|
-
condition[key] = { $size: 0 };
|
|
259
|
-
}
|
|
261
|
+
condition[key] = { $in: value };
|
|
260
262
|
}
|
|
261
263
|
} else if (Array.isArray(value)) {
|
|
262
264
|
var arr = [];
|