@nodeteam/nestjs-pipes
Advanced tools
Comparing version 1.0.9 to 1.1.0
@@ -5,2 +5,4 @@ export namespace Pipes { | ||
export type Order = Record<string, 'asc' | 'desc'>; | ||
export type Select = Record<string, boolean>; | ||
} |
{ | ||
"name": "@nodeteam/nestjs-pipes", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "Pipes collection for Nest.JS app", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -108,1 +108,20 @@ # Installation | ||
``` | ||
# SelectPipe | ||
```typescript | ||
@Query('select', SelectPipe) select?: Pipes.Select | ||
``` | ||
### Examples: | ||
* Select the columns `firstName` and `lastName` | ||
``` | ||
https://example.com/?select=firstName,lastName | ||
``` | ||
* Exclude the columns `firstName` and `lastName` | ||
``` | ||
https://example.com/?select=-firstName,-lastName | ||
``` |
import WherePipe from './prisma/where.pipe'; | ||
import OrderByPipe from './prisma/order-by.pipe'; | ||
import SelectPipe from './prisma/select.pipe'; | ||
@@ -7,2 +8,3 @@ export { | ||
OrderByPipe, | ||
SelectPipe, | ||
}; |
112733
23
524
127