remult 0.23.1 → 0.23.2
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/esm/remult-mongo.js +3 -2
- package/esm/src/remult3/remult3.js +1 -0
- package/package.json +1 -1
- package/remult-mongo.js +3 -5
- package/src/remult3/remult3.js +1 -0
package/esm/remult-mongo.js
CHANGED
|
@@ -245,16 +245,17 @@ class FilterConsumerBridgeToMongo {
|
|
|
245
245
|
this.add(col, val, '$lt');
|
|
246
246
|
}
|
|
247
247
|
containsCaseInsensitive(col, val) {
|
|
248
|
-
this.add(col, val, '$regex');
|
|
248
|
+
this.add(col, val, '$regex', { $options: 'i' });
|
|
249
249
|
// this.promises.push(col.getDbName().then(colName => {
|
|
250
250
|
// this.result.push(b => b.whereRaw(
|
|
251
251
|
// 'lower (' + colName + ") like lower ('%" + val.replace(/'/g, '\'\'') + "%')"));
|
|
252
252
|
// }));
|
|
253
253
|
}
|
|
254
|
-
add(col, val, operator) {
|
|
254
|
+
add(col, val, operator, moreOptions) {
|
|
255
255
|
this.result.push(() => ({
|
|
256
256
|
[this.nameProvider.$dbNameOf(col)]: {
|
|
257
257
|
[operator]: isNull(val) ? val : toDb(col, val),
|
|
258
|
+
...moreOptions,
|
|
258
259
|
},
|
|
259
260
|
}));
|
|
260
261
|
}
|
package/package.json
CHANGED
package/remult-mongo.js
CHANGED
|
@@ -487,20 +487,18 @@ var FilterConsumerBridgeToMongo = /** @class */ (function () {
|
|
|
487
487
|
this.add(col, val, '$lt');
|
|
488
488
|
};
|
|
489
489
|
FilterConsumerBridgeToMongo.prototype.containsCaseInsensitive = function (col, val) {
|
|
490
|
-
this.add(col, val, '$regex');
|
|
490
|
+
this.add(col, val, '$regex', { $options: 'i' });
|
|
491
491
|
// this.promises.push(col.getDbName().then(colName => {
|
|
492
492
|
// this.result.push(b => b.whereRaw(
|
|
493
493
|
// 'lower (' + colName + ") like lower ('%" + val.replace(/'/g, '\'\'') + "%')"));
|
|
494
494
|
// }));
|
|
495
495
|
};
|
|
496
|
-
FilterConsumerBridgeToMongo.prototype.add = function (col, val, operator) {
|
|
496
|
+
FilterConsumerBridgeToMongo.prototype.add = function (col, val, operator, moreOptions) {
|
|
497
497
|
var _this = this;
|
|
498
498
|
this.result.push(function () {
|
|
499
499
|
var _a, _b;
|
|
500
500
|
return (_a = {},
|
|
501
|
-
_a[_this.nameProvider.$dbNameOf(col)] = (_b = {},
|
|
502
|
-
_b[operator] = isNull(val) ? val : toDb(col, val),
|
|
503
|
-
_b),
|
|
501
|
+
_a[_this.nameProvider.$dbNameOf(col)] = tslib_1.__assign((_b = {}, _b[operator] = isNull(val) ? val : toDb(col, val), _b), moreOptions),
|
|
504
502
|
_a);
|
|
505
503
|
});
|
|
506
504
|
};
|
package/src/remult3/remult3.js
CHANGED