@punks/backend-entity-manager 0.0.485 → 0.0.487
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 +11 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/integrations/repository/typeorm/clause.d.ts +4 -0
- package/dist/cjs/types/integrations/repository/typeorm/queryClauseBuilder.d.ts +2 -1
- package/dist/esm/index.js +12 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/integrations/repository/typeorm/clause.d.ts +4 -0
- package/dist/esm/types/integrations/repository/typeorm/queryClauseBuilder.d.ts +2 -1
- package/dist/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FindOperator } from "typeorm";
|
|
2
|
-
import { BooleanFilter, DateFilter, EnumFilter, IdFilter, NumericFilter, StringFilter, StringListFilter } from "./clause";
|
|
2
|
+
import { ArrayFilter, BooleanFilter, DateFilter, EnumFilter, IdFilter, NumericFilter, StringFilter, StringListFilter } from "./clause";
|
|
3
3
|
export declare class QueryClauseBuilder {
|
|
4
|
+
stringArrayFilter(filter: ArrayFilter<string>): FindOperator<string>;
|
|
4
5
|
enumFilter<T>(filter: EnumFilter<T>): FindOperator<T>;
|
|
5
6
|
idFilter(filter: IdFilter): FindOperator<string>;
|
|
6
7
|
stringFilter(filter: StringFilter): FindOperator<string>;
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Log, csvParse, excelParse, ExcelKeyTransform, excelBuild, csvBuild, map
|
|
|
2
2
|
import { QueryCommand, ScanCommand, GetItemCommand, PutItemCommand, DeleteItemCommand, DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
3
3
|
import { unmarshall, marshall } from '@aws-sdk/util-dynamodb';
|
|
4
4
|
import { Module, applyDecorators, Injectable, SetMetadata, createParamDecorator, Global, Scope, Inject, Logger, StreamableFile, HttpException, HttpStatus } from '@nestjs/common';
|
|
5
|
-
import { MoreThanOrEqual,
|
|
5
|
+
import { MoreThanOrEqual, IsNull, And, Equal, Not, MoreThan, LessThanOrEqual, LessThan, ILike, Like, Between, In, Or, Repository } from 'typeorm';
|
|
6
6
|
import { Reflector } from '@nestjs/core';
|
|
7
7
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
8
8
|
import { hash } from 'bcrypt';
|
|
@@ -3596,6 +3596,17 @@ class QueryBuilderBase {
|
|
|
3596
3596
|
}
|
|
3597
3597
|
|
|
3598
3598
|
class QueryClauseBuilder {
|
|
3599
|
+
stringArrayFilter(filter) {
|
|
3600
|
+
if (filter.eq) {
|
|
3601
|
+
return `{${filter.eq
|
|
3602
|
+
.map((v) => `"${v}"`)
|
|
3603
|
+
.join(",")}}`;
|
|
3604
|
+
}
|
|
3605
|
+
if (filter?.isNull) {
|
|
3606
|
+
return IsNull();
|
|
3607
|
+
}
|
|
3608
|
+
return And();
|
|
3609
|
+
}
|
|
3599
3610
|
enumFilter(filter) {
|
|
3600
3611
|
const clauses = [];
|
|
3601
3612
|
if (!isNullOrUndefined(filter?.in)) {
|