@punks/backend-entity-manager 0.0.236 → 0.0.237

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 CHANGED
@@ -2932,7 +2932,7 @@ class QueryClauseBuilder {
2932
2932
  clauses.push(typeorm.ILike(filter.eq));
2933
2933
  }
2934
2934
  if (!backendCore.isNullOrUndefined(filter?.like)) {
2935
- clauses.push(typeorm.Like(filter.like.replaceAll("*", "%")));
2935
+ clauses.push(typeorm.ILike(filter.like.replaceAll("*", "%")));
2936
2936
  }
2937
2937
  if (!backendCore.isNullOrUndefined(filter?.ne)) {
2938
2938
  clauses.push(typeorm.Not(typeorm.Equal(filter.ne)));
@@ -2944,7 +2944,7 @@ class QueryClauseBuilder {
2944
2944
  clauses.push(typeorm.Not(typeorm.In(filter.notIn)));
2945
2945
  }
2946
2946
  if (!backendCore.isNullOrUndefined(filter?.notLike)) {
2947
- clauses.push(typeorm.Not(typeorm.Like(filter.notLike.replaceAll("*", "%"))));
2947
+ clauses.push(typeorm.Not(typeorm.ILike(filter.notLike.replaceAll("*", "%"))));
2948
2948
  }
2949
2949
  if (filter?.isNull === true) {
2950
2950
  clauses.push(typeorm.IsNull());
@@ -2968,6 +2968,12 @@ class QueryClauseBuilder {
2968
2968
  if (!backendCore.isNullOrUndefined(filter?.lt)) {
2969
2969
  clauses.push(typeorm.LessThan(filter.lt));
2970
2970
  }
2971
+ if (!backendCore.isNullOrUndefined(filter?.in)) {
2972
+ clauses.push(typeorm.In(filter.in ?? []));
2973
+ }
2974
+ if (!backendCore.isNullOrUndefined(filter?.eq)) {
2975
+ clauses.push(typeorm.Equal(filter.eq));
2976
+ }
2971
2977
  if (filter?.isNull === true) {
2972
2978
  clauses.push(typeorm.IsNull());
2973
2979
  }
@@ -3097,7 +3103,11 @@ class TypeOrmQueryBuilder extends QueryBuilderBase {
3097
3103
  const queryResults = await this.countQueryResults(request, context);
3098
3104
  const results = await this.findPagedQueryResults(request, context);
3099
3105
  const facets = request.options?.includeFacets
3100
- ? await this.calculateFacets(request, context)
3106
+ ? // todo: refactor avoiding to manipulate the request object
3107
+ await this.calculateFacets({
3108
+ ...request,
3109
+ filters: request.options.facetsFilters,
3110
+ }, context)
3101
3111
  : undefined;
3102
3112
  const childrenMap = request.options?.includeChildrenMap
3103
3113
  ? await this.calculateChildrenMap(results)