Skip to content

Commit

Permalink
feat(request): added search method to the query builder, refactored, …
Browse files Browse the repository at this point in the history
…tests not ready
  • Loading branch information
michaelyali committed Sep 17, 2019
1 parent ea001fb commit 30631ae
Show file tree
Hide file tree
Showing 10 changed files with 997 additions and 965 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
setupFilesAfterEnv: ['jest-extended'],
moduleNameMapper: {
'^@nestjsx/(.+)': '<rootDir>/packages/$1/src',
},
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"cz-conventional-changelog": "3.0.2",
"husky": "3.0.5",
"jest": "24.9.0",
"jest-extended": "^0.11.2",
"lerna": "3.16.4",
"nodemon": "1.19.2",
"npm-check": "5.9.0",
Expand All @@ -77,6 +78,7 @@
"pg": "7.12.1",
"prettier": "1.18.2",
"pretty-quick": "1.11.1",
"qs": "^6.8.0",
"redis": "2.8.0",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.0",
Expand All @@ -92,7 +94,9 @@
"typescript": "3.6.3",
"validate-commit-msg": "2.14.0"
},
"devDependencies": {},
"devDependencies": {
"@types/qs": "^6.5.3"
},
"author": {
"name": "Michael Yali",
"email": "[email protected]"
Expand Down
3 changes: 2 additions & 1 deletion packages/crud-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"build": "npx tsc -b"
},
"dependencies": {
"@nestjsx/util": "^4.2.0"
"@nestjsx/util": "^4.2.0",
"qs": "^6.8.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { QueryFields, QueryFilter, QueryJoin, QuerySort } from '../types';
import { QueryFields, QuerySearch, QueryFilter, QueryJoin, QuerySort } from '../types';

export interface CreateQueryParams {
fields?: QueryFields;
search?: QuerySearch;
filter?: QueryFilter[];
or?: QueryFilter[];
join?: QueryJoin[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface RequestQueryBuilderOptions {
delimStr?: string;
paramNamesMap?: {
fields?: string | string[];
search?: string | string[];
filter?: string | string[];
or?: string | string[];
join?: string | string[];
Expand Down
Loading

0 comments on commit 30631ae

Please sign in to comment.