Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for Model.bulkCreate 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 hooks

hooks: boolean

Run before / after bulk create hooks?

Optional ignoreDuplicates

ignoreDuplicates: boolean

Ignore duplicate values for primary keys? (not supported by postgres)

Defaults to false

Optional individualHooks

individualHooks: boolean

Run before / after create hooks for each individual Instance? BulkCreate hooks will still be run if options.hooks is true.

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 searchPath

searchPath: string

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

Optional transaction

transaction: Transaction

Transaction to run query under

Optional updateOnDuplicate

updateOnDuplicate: string[]

Fields to update if row key already exists (on duplicate key update)? (only supported by mysql & mariadb). By default, all fields are updated.

Optional validate

validate: boolean

Run validations before the row is inserted

Generated using TypeDoc