@punks/backend-entity-manager 0.0.493 → 0.0.494
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/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/integrations/repository/typeorm/clause.d.ts +1 -0
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/integrations/repository/typeorm/clause.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3714,6 +3714,12 @@ class QueryClauseBuilder {
|
|
|
3714
3714
|
if (filter?.isNull === false) {
|
|
3715
3715
|
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
3716
3716
|
}
|
|
3717
|
+
if (filter?.isEmpty === true) {
|
|
3718
|
+
clauses.push(typeorm.Raw((alias) => `TRIM(${alias}) IS NULL OR TRIM(${alias}) = ''`));
|
|
3719
|
+
}
|
|
3720
|
+
if (filter?.isEmpty === false) {
|
|
3721
|
+
clauses.push(typeorm.Raw((alias) => `TRIM(${alias}) IS NOT NULL AND TRIM(${alias}) <> ''`));
|
|
3722
|
+
}
|
|
3717
3723
|
return typeorm.And(...clauses);
|
|
3718
3724
|
}
|
|
3719
3725
|
stringListFilter(filter) {
|