Skip to content

Commit

Permalink
feat(scopes): update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneTurc authored and fzn0x committed Feb 18, 2022
1 parent 5666478 commit 773a10f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ export interface ModelOptions<M extends Model = Model> {
* Enable where scopes merging using Op.and operator.
* When enabled, scopes containing the same attribute in a where clause will be grouped with the Op.and operator
* For instance merging scopes containing `{ where: { myField: 1 }}` and `{ where: { myField: 2 }}` will result in
* `{ where: { [Op.and]: [1, 2] }}`.
* `{ where: { [Op.and]: [{ myField: 1 }, { myField: 2 }] } }`.
*
* @default false
*/
Expand Down
2 changes: 1 addition & 1 deletion src/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ class Model {
* @param {string} [options.initialAutoIncrement] Set the initial AUTO_INCREMENT value for the table in MySQL.
* @param {object} [options.hooks] An object of hook function that are called before and after certain lifecycle events. The possible hooks are: beforeValidate, afterValidate, validationFailed, beforeBulkCreate, beforeBulkDestroy, beforeBulkUpdate, beforeCreate, beforeDestroy, beforeUpdate, afterCreate, beforeSave, afterDestroy, afterUpdate, afterBulkCreate, afterSave, afterBulkDestroy and afterBulkUpdate. See Hooks for more information about hook functions and their signatures. Each property can either be a function, or an array of functions.
* @param {object} [options.validate] An object of model wide validations. Validations have access to all model values via `this`. If the validator function takes an argument, it is assumed to be async, and is called with a callback that accepts an optional error.
* @param {boolean} [options.mergeWhereScopesWithAndOperator] Merge `where` properties of scopes by merging similar attributes together with `Op.and`.
* @param {boolean} [options.mergeWhereScopesWithAndOperator] Merge `where` properties of scopes together by adding `Op.and` at the top-most level.
*
* @returns {Model}
*/
Expand Down

0 comments on commit 773a10f

Please sign in to comment.