File

src/api/core/queries/filterableQuery.ts

Description

Extend BaseQuery and overrides where() and relation() methods. Used by SELECT, UPDATE and DELETE queries.

Example

```typescript

  • dataModule.dataset("posts")
  • .select()
  • .where(filter => filter("date").isLessThan(lastDate))
  • .relation("authors", query => query.where(filter => filter("age").isGreaterThan(minAge)))
  • .execute();
  • ```

Extends

BaseQuery

Index

Methods

Methods

Public where
where(filter: IFilteringCriterion | IFilteringCriterionCallback)

Filter the dataset rows with some conditions where the operation will be applied

Parameters :
Name Type Optional Description
filter IFilteringCriterion<T> | IFilteringCriterionCallback<T> No

Filtering criteria or a callback that returns a filtering criteria with the conditions

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 :
Name Type Optional Description
fields Array<Extract | IAggField> No

fields names or aggregation object

Public fields
fields(...fields: Array)
Parameters :
Name Type Optional
fields Array<Extract | IAggField> No
Public fields
fields(field: K | IAggField, ...fields: Array)
Type parameters :
  • K
Parameters :
Name Type Optional
field K | IAggField<T> No
fields Array<K | IAggField> No

result-matching ""

    No results matching ""