c2-mongoose 2.1.180 → 2.1.181
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/dist/flow/SearchFlow.d.ts +0 -1
- package/dist/flow/SearchFlow.js +0 -19
- package/package.json +1 -1
- package/src/flow/SearchFlow.ts +18 -18
|
@@ -33,6 +33,5 @@ declare abstract class SearchFlow {
|
|
|
33
33
|
sumByPaging(model: mongoose.Model<any>, fieldToSum: any, fieldToGroup: any, items?: any): Promise<SearchResponse<any>>;
|
|
34
34
|
isValidObjectId(value: string): boolean;
|
|
35
35
|
buildDefaultFilters(objectSearch: any): any;
|
|
36
|
-
addFilterModel(model: any, filters: any): void;
|
|
37
36
|
}
|
|
38
37
|
export default SearchFlow;
|
package/dist/flow/SearchFlow.js
CHANGED
|
@@ -523,25 +523,6 @@ var SearchFlow = /** @class */ (function () {
|
|
|
523
523
|
delete filters['$and'];
|
|
524
524
|
return filters;
|
|
525
525
|
};
|
|
526
|
-
SearchFlow.prototype.addFilterModel = function (model, filters) {
|
|
527
|
-
Object.entries(model).forEach(function (_a) {
|
|
528
|
-
var key = _a[0], value = _a[1];
|
|
529
|
-
if (key.endsWith('DateRange')) {
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
if (key.endsWith('Like')) {
|
|
533
|
-
return;
|
|
534
|
-
}
|
|
535
|
-
if (['onlyMetadata', 'projection', 'pageable', 'orderSense', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
if ((0, Utils_1.isNotEmpty)(value)) {
|
|
539
|
-
var condition = {};
|
|
540
|
-
condition[key] = value;
|
|
541
|
-
filters.$and.push(condition);
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
};
|
|
545
526
|
return SearchFlow;
|
|
546
527
|
}());
|
|
547
528
|
exports.default = SearchFlow;
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -473,24 +473,24 @@ abstract class SearchFlow {
|
|
|
473
473
|
return filters
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
public addFilterModel(model: any, filters: any) {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
476
|
+
// public addFilterModel(model: any, filters: any) {
|
|
477
|
+
// Object.entries(model).forEach(([key, value]) => {
|
|
478
|
+
// if (key.endsWith('DateRange')) {
|
|
479
|
+
// return
|
|
480
|
+
// }
|
|
481
|
+
// if (key.endsWith('Like')) {
|
|
482
|
+
// return
|
|
483
|
+
// }
|
|
484
|
+
// if (['onlyMetadata', 'projection', 'pageable', 'orderSense', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
|
|
485
|
+
// return
|
|
486
|
+
// }
|
|
487
|
+
// if (isNotEmpty(value)) {
|
|
488
|
+
// let condition = {} as any
|
|
489
|
+
// condition[key] = value
|
|
490
|
+
// filters.$and.push(condition)
|
|
491
|
+
// }
|
|
492
|
+
// })
|
|
493
|
+
// }
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
export default SearchFlow
|