diff --git a/dist-lib/filters/decorators/resolver.decorator.d.ts b/dist-lib/filters/decorators/resolver.decorator.d.ts index 86c3941..f1561a9 100644 --- a/dist-lib/filters/decorators/resolver.decorator.d.ts +++ b/dist-lib/filters/decorators/resolver.decorator.d.ts @@ -18,5 +18,5 @@ export interface FilterArgs extends Brackets { export declare class FilterPipe implements PipeTransform { readonly args: IFilterPipeArgs; constructor(args: IFilterPipeArgs); - transform(value: any, _metadata: ArgumentMetadata): Brackets | import("../input-type-generator").IFilter; + transform(value: any, _metadata: ArgumentMetadata): Brackets | import("../input-type-generator").IFilter[]; } diff --git a/dist-lib/filters/decorators/resolver.decorator.js b/dist-lib/filters/decorators/resolver.decorator.js index 9441ed4..9dcf521 100644 --- a/dist-lib/filters/decorators/resolver.decorator.js +++ b/dist-lib/filters/decorators/resolver.decorator.js @@ -60,7 +60,11 @@ let FilterPipe = class FilterPipe { this.args = args; } transform(value, _metadata) { - return (0, query_builder_1.convertFilterParameters)(value, this.args.customFields, this.args.options); + let params = value; + if (!Array.isArray(value)) { + params = [value]; + } + return (0, query_builder_1.convertFilterParameters)(params, query_builder_1.EOperationType.AND, this.args.customFields, this.args.options); } }; exports.FilterPipe = FilterPipe; diff --git a/dist-lib/filters/decorators/resolver.decorator.js.map b/dist-lib/filters/decorators/resolver.decorator.js.map index ec8429a..86586e6 100644 --- a/dist-lib/filters/decorators/resolver.decorator.js.map +++ b/dist-lib/filters/decorators/resolver.decorator.js.map @@ -1 +1 @@ -{"version":3,"file":"resolver.decorator.js","sourceRoot":"","sources":["../../../lib/filters/decorators/resolver.decorator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6E;AAC7E,6CAAuC;AAGvC,qDAAoD;AACpD,4CAA2E;AAC3E,kEAAiE;AACjE,oDAA2D;AAYpD,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE;IAOxC,CAAC,CAAC;AACJ,CAAC,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A,EAAE,CAAC;YAClB,KAAK,CAAC,IAAI,CACR,IAAI,UAAU,CAAC;gBACb,OAAO;gBACP,YAAY;aACb,CAAC,CACH,CAAA;QACH,CAAC;QAED,IAAA,cAAI,EACF;YACE,IAAI,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,KAAI,OAAO;YAC9B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,GAAG,EAAE,CAAC,cAAc;SAC3B,EACD,GAAG,KAAK,CACT,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IACtC,CAAC,CAAA;AACH,CAAC,CAAA;AA7CY,QAAA,MAAM,UA6ClB;AAUM,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,YAA4B,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;IAAG,CAAC;IACrD,SAAS,CAAC,KAAU,EAAE,SAA2B;QAC/C,OAAO,IAAA,uCAAuB,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;CACF,CAAA;AALY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;;GACA,UAAU,CAKtB"} \ No newline at end of file +{"version":3,"file":"resolver.decorator.js","sourceRoot":"","sources":["../../../lib/filters/decorators/resolver.decorator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6E;AAC7E,6CAAuC;AAGvC,qDAAoD;AACpD,4CAA2E;AAC3E,kEAAiE;AACjE,oDAA2E;AAYpE,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE;IAOxC,CAAC,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB;AAKK,MAAM,MAAM,GAAG,CAAC,UAA2C,EAAE,OAAgC,EAAE,EAAE;IACtG,OAAO,CAAC,MAAM,EAAE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,IAAA,cAAI,EACF;YACE,IAAI,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,KAAI,OAAO;YAC9B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,GAAG,EAAE,CAAC,cAAc;SAC3B,EACD,GAAG,KAAK,CACT,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IACtC,CAAC,CAAA;AACH,CAAC,CAAA;AA7CY,QAAA,MAAM,UA6ClB;AAUM,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,YAA4B,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;IAAG,CAAC;IACrD,SAAS,CAAC,KAAU,EAAE,SAA2B;QAC/C,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,CAAC;QACD,OAAO,IAAA,uCAAuB,EAAC,MAAM,EAAE,8BAAc,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxG,CAAC;CACF,CAAA;AATY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;;GACA,UAAU,CAStB"} \ No newline at end of file diff --git a/dist-lib/filters/input-type-generator.d.ts b/dist-lib/filters/input-type-generator.d.ts index 653c82d..8bfc47c 100644 --- a/dist-lib/filters/input-type-generator.d.ts +++ b/dist-lib/filters/input-type-generator.d.ts @@ -31,10 +31,10 @@ export type IFilterField = { null: T[K]; }; }; -export interface IFilter { - and: IFilterField[]; - or: IFilterField[]; -} +export type IFilter = { + and?: IFilter[]; + or?: IFilter[]; +} & IFilterField; export type RawFilterArgs = IFilter & IFilterField; export declare enum InputMapPrefixes { PropertyFilterInputType = "PropertyFilterInputType", diff --git a/dist-lib/filters/input-type-generator.js b/dist-lib/filters/input-type-generator.js index 903c8b5..6c2c3f7 100644 --- a/dist-lib/filters/input-type-generator.js +++ b/dist-lib/filters/input-type-generator.js @@ -155,18 +155,32 @@ function generateFilterInputType(classes, name) { } const getFilterFullInputType = (classes, name) => { const key = `${name}_FilterInputType`; + const baseKey = `${name}_BaseFilterInputType`; if (filterFullTypes.get(key)) { return filterFullTypes.get(key); } const FilterInputType = generateFilterInputType(classes, name); + let BaseEntityInput = class BaseEntityInput extends FilterInputType { + }; + __decorate([ + (0, graphql_1.Field)(() => [BaseEntityInput], { nullable: true }), + __metadata("design:type", Array) + ], BaseEntityInput.prototype, "and", void 0); + __decorate([ + (0, graphql_1.Field)(() => [BaseEntityInput], { nullable: true }), + __metadata("design:type", Array) + ], BaseEntityInput.prototype, "or", void 0); + BaseEntityInput = __decorate([ + (0, graphql_1.InputType)(baseKey) + ], BaseEntityInput); let EntityWhereInput = class EntityWhereInput extends FilterInputType { }; __decorate([ - (0, graphql_1.Field)(() => [FilterInputType], { nullable: true }), + (0, graphql_1.Field)(() => [BaseEntityInput], { nullable: true }), __metadata("design:type", Array) ], EntityWhereInput.prototype, "and", void 0); __decorate([ - (0, graphql_1.Field)(() => [FilterInputType], { nullable: true }), + (0, graphql_1.Field)(() => [BaseEntityInput], { nullable: true }), __metadata("design:type", Array) ], EntityWhereInput.prototype, "or", void 0); EntityWhereInput = __decorate([ diff --git a/dist-lib/filters/input-type-generator.js.map b/dist-lib/filters/input-type-generator.js.map index e6ac8d7..4a06aad 100644 --- a/dist-lib/filters/input-type-generator.js.map +++ b/dist-lib/filters/input-type-generator.js.map @@ -1 +1 @@ -{"version":3,"file":"input-type-generator.js","sourceRoot":"","sources":["../../lib/filters/input-type-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAqG;AAErG,kDAAiD;AACjD,2CAAmG;AAGnG,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB,2BAAS,CAAA;IACT,6BAAW,CAAA;IACX,2BAAS,CAAA;IACT,6BAAW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QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACnF,CAAC;aAAM,CAAC;QAOR,CAAC;IACH,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAEM,MAAM,sBAAsB,GAAG,CAAC,OAAqB,EAAE,IAAY,EAAE,EAAE;IAC5E,MAAM,GAAG,GAAG,GAAG,IAAI,kBAAkB,CAAC;IACtC,IAAI,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IACD,MAAM,eAAe,GAAG,uBAAuB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAE/D,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,eAAe;KAK7C,CAAA;IAHC;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;iDAC/B;IAElB;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;gDAChC;IAJb,gBAAgB;QADrB,IAAA,mBAAS,EAAC,GAAG,CAAC;OACT,gBAAgB,CAKrB;IACD,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAC3C,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAA;AAfY,QAAA,sBAAsB,0BAelC"} \ No newline at end of file +{"version":3,"file":"input-type-generator.js","sourceRoot":"","sources":["../../lib/filters/input-type-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAqG;AAErG,kDAAiD;AACjD,2CAAmG;AAGnG,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB,2BAAS,CAAA;IACT,6BAAW,CAAA;IACX,2BAAS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Jb,gBAAgB;QADrB,IAAA,mBAAS,EAAC,GAAG,CAAC;OACT,gBAAgB,CAKrB;IACD,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAC3C,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAA;AAzBY,QAAA,sBAAsB,0BAyBlC"} \ No newline at end of file diff --git a/dist-lib/filters/query.builder.d.ts b/dist-lib/filters/query.builder.d.ts index b3c5ff4..1e9f77a 100644 --- a/dist-lib/filters/query.builder.d.ts +++ b/dist-lib/filters/query.builder.d.ts @@ -2,4 +2,8 @@ import { Brackets } from "typeorm"; import { GraphqlFilterFieldMetadata } from "./decorators/field.decorator"; import { IFilterDecoratorParams } from "./decorators/resolver.decorator"; import { IFilter } from "./input-type-generator"; -export declare const convertFilterParameters: (parameters?: IFilter, customFields?: Map, options?: IFilterDecoratorParams) => Brackets | IFilter; +export declare enum EOperationType { + AND = 0, + OR = 1 +} +export declare const convertFilterParameters: (parameters?: IFilter[], opType?: EOperationType, customFields?: Map, options?: IFilterDecoratorParams) => Brackets | IFilter[]; diff --git a/dist-lib/filters/query.builder.js b/dist-lib/filters/query.builder.js index e0174ae..e48c032 100644 --- a/dist-lib/filters/query.builder.js +++ b/dist-lib/filters/query.builder.js @@ -1,51 +1,49 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.convertFilterParameters = void 0; +exports.convertFilterParameters = exports.EOperationType = void 0; const typeorm_1 = require("typeorm"); const functions_1 = require("../utils/functions"); const constants_1 = require("./constants"); const input_type_generator_1 = require("./input-type-generator"); -const convertFilterParameters = (parameters, customFields, options) => { +var EOperationType; +(function (EOperationType) { + EOperationType[EOperationType["AND"] = 0] = "AND"; + EOperationType[EOperationType["OR"] = 1] = "OR"; +})(EOperationType || (exports.EOperationType = EOperationType = {})); +const convertFilterParameters = (parameters, opType = EOperationType.AND, customFields, options) => { if (parameters === null || parameters === void 0 ? void 0 : parameters.whereFactory) return parameters; return new typeorm_1.Brackets((qb) => { if (parameters == null) { return; } - const clonnedParams = Object.assign({}, parameters); - delete clonnedParams.and; - delete clonnedParams.or; - if (parameters === null || parameters === void 0 ? void 0 : parameters.and) { - qb.andWhere(new typeorm_1.Brackets((andBracketsQb) => { - for (const op of parameters === null || parameters === void 0 ? void 0 : parameters.and) { - const andParameters = recursivelyTransformComparators(op, customFields, options === null || options === void 0 ? void 0 : options.sqlAlias); - if (andParameters === null || andParameters === void 0 ? void 0 : andParameters.length) { - for (const query of andParameters) { - andBracketsQb.andWhere(query[0], query[1]); - } - } + for (const op of parameters) { + if (op.and) { + const innerBrackets = (0, exports.convertFilterParameters)(op.and, EOperationType.AND, customFields, options); + if (innerBrackets instanceof typeorm_1.Brackets) { + qb.andWhere(innerBrackets); } - })); - } - if (parameters === null || parameters === void 0 ? void 0 : parameters.or) { - qb.orWhere(new typeorm_1.Brackets((orBracketsQb) => { - for (const op of parameters === null || parameters === void 0 ? void 0 : parameters.or) { - const orParameters = recursivelyTransformComparators(op, customFields, options === null || options === void 0 ? void 0 : options.sqlAlias); - if (orParameters === null || orParameters === void 0 ? void 0 : orParameters.length) { - for (const query of orParameters) { - orBracketsQb.orWhere(query[0], query[1]); - } - } + } + if (op.or) { + const innerBrackets = (0, exports.convertFilterParameters)(op.or, EOperationType.OR, customFields, options); + if (innerBrackets instanceof typeorm_1.Brackets) { + qb.orWhere(innerBrackets); } - })); - } - const basicParameters = recursivelyTransformComparators(clonnedParams, customFields, options === null || options === void 0 ? void 0 : options.sqlAlias); - if (basicParameters) { - qb.andWhere(new typeorm_1.Brackets((basicParametersQb) => { + } + const clonnedOp = Object.assign({}, op); + delete clonnedOp.and; + delete clonnedOp.or; + const basicParameters = recursivelyTransformComparators(clonnedOp, customFields, options === null || options === void 0 ? void 0 : options.sqlAlias); + if (basicParameters) { for (const query of basicParameters) { - basicParametersQb.andWhere(query[0], query[1]); + if (opType === EOperationType.AND) { + qb.andWhere(query[0], query[1]); + } + else { + qb.orWhere(query[0], query[1]); + } } - })); + } } }); }; @@ -78,7 +76,7 @@ const recursivelyTransformComparators = (object, extendedParams, sqlAlias) => { }; const buildSqlArgument = (operatorKey, field, value) => { let result = []; - const argName = `arg_${(0, functions_1.convertArrayOfStringIntoStringNumber)([field])}`; + const argName = `arg_${(0, functions_1.convertArrayOfStringIntoStringNumber)([field])}_${Math.floor(Math.random() * 1e6)}`; if (operatorKey === input_type_generator_1.OperationQuery.eq) { if (value === null || value === 'null') { result = [`${field} is null`]; diff --git a/dist-lib/filters/query.builder.js.map b/dist-lib/filters/query.builder.js.map index ac81c0f..e544574 100644 --- a/dist-lib/filters/query.builder.js.map +++ b/dist-lib/filters/query.builder.js.map @@ -1 +1 @@ -{"version":3,"file":"query.builder.js","sourceRoot":"","sources":["../../lib/filters/query.builder.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AACnC,kDAA0E;AAC1E,2CAAsD;AAGtD,iEAAiE;AAE1D,MAAM,uBAAuB,GAAG,CAAI,UAAuB,EAAE,YAAsD,EAAE,OAAgC,EAAE,EAAE;IAG9J,IAAK,UAAkB,aAAlB,UAAU,uBAAV,UAAU,CAAU,YAAY;QAAE,OAAO,UAAU,CAAC;IAEzD,OAAO,IAAI,kBAAQ,CAAC,CAAC,EAAE,EAAE,EAAE;QACzB,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,MAAM,aAAa,qBAAO,UAAU,CAAC,CAAC;QAEtC,OAAO,aAAa,CAAC,GAAG,CAAC;QACzB,OAAO,aAAa,CAAC,EAAE,CAAC;QAExB,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,EAAE,CAAC;YACpB,EAAE,CAAC,QAAQ,CACT,IAAI,kBAAQ,CAAC,CAAC,aAAa,EAAE,EAAE;gBAC7B,KAAK,MAAM,EAAE,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,EAAE,CAAC;oBACjC,MAAM,aAAa,GAAG,+BAA+B,CAAC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EAAE,CAAC;QAC/C,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,GAAG,KAAK,cAAc,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"query.builder.js","sourceRoot":"","sources":["../../lib/filters/query.builder.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AACnC,kDAA0E;AAC1E,2CAAsD;AAGtD,iEAAiE;AAEjE,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iDAAG,CAAA;IACH,+CAAE,CAAA;AACJ,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAEM,MAAM,uBAAuB,GAAG,CAAI,UAAyB,EAAE,SAAyB,cAAc,CAAC,GAAG,EAAE,YAAsD,EAAE,OAAgC,EAAE,EAAE;IAG7M,IAAK,UAAkB,aAAlB,UAAU,uBAAV,UAAU,CAAU,YAAY;QAAE,OAAO,UAAU,CAAC;IAEzD,OAAO,IAAI,kBAAQ,CAAC,CAAC,EAAE,EAAE,EAAE;QACzB,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,KAAK,MAAM,EAAE,IAAI,UAAU,EAAE,CAAC;YAC5B,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC;gBACX,MAAM,aAAa,GAAG,IAAA,+BAAuB,EAAI,EAAE,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;gBACpG,IAAI,aAAa,YAAY,kBAAQ,EAAE,CAAC;oBACtC,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;gBAC5B,CAAC;YACH,CAAC;YAED,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;gB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