@punks/backend-entity-manager 0.0.227 → 0.0.229
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 +52 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/integrations/repository/typeorm/clause.d.ts +12 -0
- package/dist/cjs/types/integrations/repository/typeorm/queryClauseBuilder.d.ts +2 -1
- package/dist/cjs/types/platforms/nest/__test__/server/shared/api/fields.d.ts +17 -0
- package/dist/esm/index.js +53 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/integrations/repository/typeorm/clause.d.ts +12 -0
- package/dist/esm/types/integrations/repository/typeorm/queryClauseBuilder.d.ts +2 -1
- package/dist/esm/types/platforms/nest/__test__/server/shared/api/fields.d.ts +17 -0
- package/dist/index.d.ts +13 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2878,6 +2878,34 @@ class QueryClauseBuilder {
|
|
|
2878
2878
|
if (!!filter?.notIn) {
|
|
2879
2879
|
clauses.push(typeorm.Not(typeorm.In(filter.notIn)));
|
|
2880
2880
|
}
|
|
2881
|
+
if (filter?.isNull === true) {
|
|
2882
|
+
clauses.push(typeorm.IsNull());
|
|
2883
|
+
}
|
|
2884
|
+
if (filter?.isNull === false) {
|
|
2885
|
+
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
2886
|
+
}
|
|
2887
|
+
return typeorm.And(...clauses);
|
|
2888
|
+
}
|
|
2889
|
+
idFilter(filter) {
|
|
2890
|
+
const clauses = [];
|
|
2891
|
+
if (!!filter?.in) {
|
|
2892
|
+
clauses.push(typeorm.In(filter.in));
|
|
2893
|
+
}
|
|
2894
|
+
if (!!filter?.eq) {
|
|
2895
|
+
clauses.push(typeorm.Equal(filter.eq));
|
|
2896
|
+
}
|
|
2897
|
+
if (!!filter?.ne) {
|
|
2898
|
+
clauses.push(typeorm.Not(typeorm.Equal(filter.ne)));
|
|
2899
|
+
}
|
|
2900
|
+
if (!!filter?.notIn) {
|
|
2901
|
+
clauses.push(typeorm.Not(typeorm.In(filter.notIn)));
|
|
2902
|
+
}
|
|
2903
|
+
if (filter?.isNull === true) {
|
|
2904
|
+
clauses.push(typeorm.IsNull());
|
|
2905
|
+
}
|
|
2906
|
+
if (filter?.isNull === false) {
|
|
2907
|
+
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
2908
|
+
}
|
|
2881
2909
|
return typeorm.And(...clauses);
|
|
2882
2910
|
}
|
|
2883
2911
|
stringFilter(filter) {
|
|
@@ -2918,6 +2946,12 @@ class QueryClauseBuilder {
|
|
|
2918
2946
|
if (!!filter?.notLike) {
|
|
2919
2947
|
clauses.push(typeorm.Not(typeorm.Like(filter.notLike.replaceAll("*", "%"))));
|
|
2920
2948
|
}
|
|
2949
|
+
if (filter?.isNull === true) {
|
|
2950
|
+
clauses.push(typeorm.IsNull());
|
|
2951
|
+
}
|
|
2952
|
+
if (filter?.isNull === false) {
|
|
2953
|
+
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
2954
|
+
}
|
|
2921
2955
|
return typeorm.And(...clauses);
|
|
2922
2956
|
}
|
|
2923
2957
|
numericFilter(filter) {
|
|
@@ -2934,6 +2968,12 @@ class QueryClauseBuilder {
|
|
|
2934
2968
|
if (!!filter?.lt) {
|
|
2935
2969
|
clauses.push(typeorm.LessThan(filter.lt));
|
|
2936
2970
|
}
|
|
2971
|
+
if (filter?.isNull === true) {
|
|
2972
|
+
clauses.push(typeorm.IsNull());
|
|
2973
|
+
}
|
|
2974
|
+
if (filter?.isNull === false) {
|
|
2975
|
+
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
2976
|
+
}
|
|
2937
2977
|
return typeorm.And(...clauses);
|
|
2938
2978
|
}
|
|
2939
2979
|
dateFilter(filter) {
|
|
@@ -2950,6 +2990,12 @@ class QueryClauseBuilder {
|
|
|
2950
2990
|
if (!!filter?.lt) {
|
|
2951
2991
|
clauses.push(typeorm.LessThan(filter.lt));
|
|
2952
2992
|
}
|
|
2993
|
+
if (filter?.isNull === true) {
|
|
2994
|
+
clauses.push(typeorm.IsNull());
|
|
2995
|
+
}
|
|
2996
|
+
if (filter?.isNull === false) {
|
|
2997
|
+
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
2998
|
+
}
|
|
2953
2999
|
return typeorm.And(...clauses);
|
|
2954
3000
|
}
|
|
2955
3001
|
boolFilter(filter) {
|
|
@@ -2960,6 +3006,12 @@ class QueryClauseBuilder {
|
|
|
2960
3006
|
if (!backendCore.isNullOrUndefined(filter?.ne)) {
|
|
2961
3007
|
clauses.push(typeorm.Not(typeorm.Equal(filter.ne)));
|
|
2962
3008
|
}
|
|
3009
|
+
if (filter?.isNull === true) {
|
|
3010
|
+
clauses.push(typeorm.IsNull());
|
|
3011
|
+
}
|
|
3012
|
+
if (filter?.isNull === false) {
|
|
3013
|
+
clauses.push(typeorm.Not(typeorm.IsNull()));
|
|
3014
|
+
}
|
|
2963
3015
|
return typeorm.And(...clauses);
|
|
2964
3016
|
}
|
|
2965
3017
|
}
|