File

src/api/core/queries/updateQuery.ts

Description

Query object specialized for update 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.

Example

```typescript

  • dataModule.dataset("posts")
  • .update({
  • title: "My Updated Title"
  • })
  • .where(field => field("title").isLike("old title"))
  • .execute();
  • ```

Extends

FilterableQuery

Example

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
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 ""