Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for Model.create method

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 include

include: Array<Model<any, any> | IncludeOptions>

an array of include options - Used to build prefetched/included model instances. See set

TODO: See set

Optional isNewRecord

isNewRecord: boolean

Is this record new

Optional logging

logging: boolean | Function

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

Optional onDuplicate

onDuplicate: string

On Duplicate

Optional raw

raw: boolean

If set to true, values will ignore field and virtual setters.

Optional returning

returning: boolean

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

Optional searchPath

searchPath: string

An optional parameter to specify the schema search_path (Postgres only)

Optional silent

silent: boolean

If true, the updatedAt timestamp will not be updated.

Defaults to false

Optional transaction

transaction: Transaction

Transaction to run query under

Optional validate

validate: boolean

Run validations before the row is inserted

Generated using TypeDoc