Skip to content

postgrelize / BulkHookOptions

Type Alias: BulkHookOptions ​

BulkHookOptions = object

Defined in: src/model/bulk-options.ts:67

Hook switches shared by bulk update, destroy and restore.

Example ​

ts
const opts: BulkHookOptions = { hooks: true, individualHooks: true };
await User.destroy({ where: { active: false }, ...opts });

Properties ​

hooks? ​

optional hooks?: boolean

Defined in: src/model/bulk-options.ts:70

Run the bulk hooks (beforeBulkUpdate, beforeBulkDestroy, ...).

Default Value ​

ts
true

individualHooks? ​

optional individualHooks?: boolean

Defined in: src/model/bulk-options.ts:73

Also run per-instance hooks; rows are loaded first, which costs an extra query.

Default Value ​

ts
false

Released under the MIT License.