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.
@@ -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
  }
@@ -62,3 +62,4 @@ remult.apiClient.url='localhost:3007/api
62
62
 
63
63
  */
64
64
  //y2 - i had a question about find first's different syntax from find that confused a user
65
+ //p2 - allowApiUpdate should be false for include in api false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "types": "index.d.ts",
6
6
  "module": "esm/index.js",
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
  };
@@ -63,3 +63,4 @@ remult.apiClient.url='localhost:3007/api
63
63
 
64
64
  */
65
65
  //y2 - i had a question about find first's different syntax from find that confused a user
66
+ //p2 - allowApiUpdate should be false for include in api false