Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IOptions

obau() options.

Hierarchy

  • IOptions

Index

Properties

Optional before

before: TBefore | TBefore[]

Defines hooks to be run before inserts, patches, and updates to a database entry. Can perform additional checks or validations, as well as mutate the objects.

Optional old

old: undefined | false | true

Preserves default behavior when true. If false, old database record values will be ignored when patching and updating. Please be aware of the repercusions: see static update and patch for more information.

Default: true.

Optional order

order: IOrder

Defines the order in which tasks will run. See IOrder.

Optional schema

schema: JSONSchema7

A JSON Schema intended for partial validation to be run when data objects are mutated by the before hooks. If the data fails to pass the schema validation, an Objection.js ValidationError will be thrown via Model.createValidationError().

Optional unique

unique: IUnique | TUniqueFn | Array<IUnique | TUniqueFn>

Allows unique checks before inserts, patches, and updates. Unique tests can be determined either by a IUnique object specifying the columns to be considered, or by a query returning function.

Generated using TypeDoc