Options
All
  • Public
  • Public/Protected
  • All
Menu

Options used for Model.update

Hierarchy

Index

Properties

Optional benchmark

benchmark: boolean

Print query execution time in milliseconds when logging SQL.

Optional fields

fields: string[]

The fields to insert / update. Defaults to all fields

Optional hooks

hooks: boolean

Run before / after bulk update hooks?

Defaults to true

Optional individualHooks

individualHooks: boolean

Run before / after update hooks?. If true, this will execute a SELECT followed by individual UPDATEs. A select is needed, because the row data needs to be passed to the hooks

Defaults to false

Optional limit

limit: number

How many rows to update (only for mysql and mariadb)

Optional logging

logging: boolean | Function

A function that gets executed while running the query to log the sql.

Optional returning

returning: boolean

Append RETURNING * to get back auto generated values (Postgres only)

Optional sideEffects

sideEffects: boolean

Whether or not to update the side effects of any virtual setters.

Defaults to true

Optional silent

silent: boolean

If true, the updatedAt timestamp will not be updated.

Optional transaction

transaction: Transaction

Transaction to run query under

Optional validate

validate: boolean

Run validations before the row is inserted

where

Options to describe the scope of the search.

Generated using TypeDoc