src/api/core/queries/selectQuery.ts
Query object specialized for select statements.
For TypeScript users it implements a generic type T that represents your dataset (defaults to any).
This object is generated automatically from the Dataset object, never to be instantiated directly.
```typescript
Methods |
| Public limit | ||||||||
limit(limit: number)
|
||||||||
|
Limit the operation for the first n records
Parameters :
|
| Public offset | ||||||||
offset(offset: number)
|
||||||||
|
Offset selection with the offset records
Parameters :
|
| Public related | |||||||||||||||
related(resourceName: R, callback: (q: RelatedQuery
|
|||||||||||||||
Type parameters :
|
|||||||||||||||
|
Allow to populate related resource fields
Parameters :
Example :
|
| Public sortAsc | ||||||
sortAsc(...fields: K[])
|
||||||
Type parameters :
|
||||||
|
Parameters :
|
| Public sortAsc | |||||||||
sortAsc(field: K, ...fields: K[])
|
|||||||||
Type parameters :
|
|||||||||
|
Parameters :
|
| Public sortDesc | ||||||||
sortDesc(fields: K[])
|
||||||||
Type parameters :
|
||||||||
|
Sort decedent the response that will represent the affected data
Parameters :
|
| Public sortDesc | ||||||
sortDesc(...fields: K[])
|
||||||
Type parameters :
|
||||||
|
Parameters :
|
| Public sortDesc | |||||||||
sortDesc(field: K, ...fields: K[])
|
|||||||||
Type parameters :
|
|||||||||
|
Parameters :
|
| Public where | ||||||||
where(filter: IFilteringCriterion
|
||||||||
|
Filter the dataset rows with some conditions where the operation will be applied
Parameters :
|
| Public fields | ||||||||
fields(fields: Array
|
||||||||
|
Select the fields to be returned at the response that represent the affected data Aggregation functions can be provided as an object: { fn: aggFn, col: string }
Parameters :
|
| Public fields | ||||||
fields(...fields: Array
|
||||||
|
Parameters :
|
| Public fields | |||||||||
fields(field: K | IAggField
|
|||||||||
Type parameters :
|
|||||||||
|
Parameters :
|
| Public fields | ||||||||
fields(fields: Array
|
||||||||
|
Select the fields to be returned at the response that represent the affected data Aggregation functions can be provided as an object: { fn: aggFn, col: string }
Parameters :
|
| Public fields | ||||||
fields(...fields: Array
|
||||||
|
Parameters :
|
| Public fields | |||||||||
fields(field: K | IAggField
|
|||||||||
Type parameters :
|
|||||||||
|
Parameters :
|