remult 0.26.20 → 0.26.21

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.
@@ -230,11 +230,11 @@ export class Filter {
230
230
  break;
231
231
  case '$startsWith':
232
232
  found = true;
233
- result.push(fh.contains(element));
233
+ result.push(fh.startsWith(element));
234
234
  break;
235
235
  case '$endsWith':
236
236
  found = true;
237
- result.push(fh.contains(element));
237
+ result.push(fh.endsWith(element));
238
238
  break;
239
239
  case '$notContains':
240
240
  found = true;
@@ -338,6 +338,12 @@ class filterHelper {
338
338
  notContains(val) {
339
339
  return new Filter((add) => add.notContainsCaseInsensitive(this.metadata, val));
340
340
  }
341
+ startsWith(val) {
342
+ return new Filter((add) => add.startsWithCaseInsensitive(this.metadata, val));
343
+ }
344
+ endsWith(val) {
345
+ return new Filter((add) => add.endsWithCaseInsensitive(this.metadata, val));
346
+ }
341
347
  isLessThan(val) {
342
348
  val = this.processVal(val);
343
349
  return new Filter((add) => add.isLessThan(this.metadata, val));
@@ -407,6 +413,12 @@ class manyToOneFilterHelper {
407
413
  notContains(val) {
408
414
  throw new Error('Invalid for Many To One Relation Field');
409
415
  }
416
+ endsWith(val) {
417
+ throw new Error('Invalid for Many To One Relation Field');
418
+ }
419
+ startsWith(val) {
420
+ throw new Error('Invalid for Many To One Relation Field');
421
+ }
410
422
  isLessThan(val) {
411
423
  throw new Error('Invalid for Many To One Relation Field');
412
424
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.26.20",
3
+ "version": "0.26.21",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {
@@ -279,11 +279,11 @@ var Filter = /** @class */ (function () {
279
279
  break;
280
280
  case '$startsWith':
281
281
  found = true;
282
- result.push(fh.contains(element));
282
+ result.push(fh.startsWith(element));
283
283
  break;
284
284
  case '$endsWith':
285
285
  found = true;
286
- result.push(fh.contains(element));
286
+ result.push(fh.endsWith(element));
287
287
  break;
288
288
  case '$notContains':
289
289
  found = true;
@@ -434,6 +434,16 @@ var filterHelper = /** @class */ (function () {
434
434
  return add.notContainsCaseInsensitive(_this.metadata, val);
435
435
  });
436
436
  };
437
+ filterHelper.prototype.startsWith = function (val) {
438
+ var _this = this;
439
+ return new Filter(function (add) {
440
+ return add.startsWithCaseInsensitive(_this.metadata, val);
441
+ });
442
+ };
443
+ filterHelper.prototype.endsWith = function (val) {
444
+ var _this = this;
445
+ return new Filter(function (add) { return add.endsWithCaseInsensitive(_this.metadata, val); });
446
+ };
437
447
  filterHelper.prototype.isLessThan = function (val) {
438
448
  var _this = this;
439
449
  val = this.processVal(val);
@@ -525,6 +535,12 @@ var manyToOneFilterHelper = /** @class */ (function () {
525
535
  manyToOneFilterHelper.prototype.notContains = function (val) {
526
536
  throw new Error('Invalid for Many To One Relation Field');
527
537
  };
538
+ manyToOneFilterHelper.prototype.endsWith = function (val) {
539
+ throw new Error('Invalid for Many To One Relation Field');
540
+ };
541
+ manyToOneFilterHelper.prototype.startsWith = function (val) {
542
+ throw new Error('Invalid for Many To One Relation Field');
543
+ };
528
544
  manyToOneFilterHelper.prototype.isLessThan = function (val) {
529
545
  throw new Error('Invalid for Many To One Relation Field');
530
546
  };