Skip to content

postgrelize / InstanceDestroyOptions

Type Alias: InstanceDestroyOptions ​

InstanceDestroyOptions = QueryOptionsBase & object

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

Options of instance destroy.

Type Declaration ​

force? ​

optional force?: boolean

For paranoid models: delete the row instead of setting deletedAt.

Default Value ​

ts
false

hooks? ​

optional hooks?: boolean

Run beforeDestroy / afterDestroy hooks.

Default Value ​

ts
true

See ​

Model.destroy

Example ​

ts
await post.destroy({ force: true, transaction });
const opts: InstanceDestroyOptions = { hooks: false };

Released under the MIT License.