diff --git a/docs/manual/core-concepts/model-querying-basics.md b/docs/manual/core-concepts/model-querying-basics.md index 3f5c1a0ff664..325130befab5 100644 --- a/docs/manual/core-concepts/model-querying-basics.md +++ b/docs/manual/core-concepts/model-querying-basics.md @@ -699,3 +699,14 @@ await User.min('age', { where: { age: { [Op.gt]: 5 } } }); // 10 await User.sum('age'); // 55 await User.sum('age', { where: { age: { [Op.gt]: 5 } } }); // 50 ``` + +### `increment`, `decrement` + +Sequelize also provides the `increment` convenience method. + +Let's assume we have a user, whose age is 10. + +```js +await User.increment({age: 5}, { where: { id: 1 } }) // Will increase age to 15 +await User.increment({age: -5}, { where: { id: 1 } }) // Will decrease age to 5 +```