* Decrement the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The decrement is done using a * ```sql SET column = column - X WHERE foo = 'bar'``` query. To get the correct value after a decrement into the Insta
(fields, options)
| 3432 | * @returns {Promise<Model[],?number>} returns an array of affected rows and affected count with `options.returning` true, whenever supported by dialect |
| 3433 | */ |
| 3434 | static async decrement(fields, options) { |
| 3435 | return this.increment(fields, { |
| 3436 | by: 1, |
| 3437 | ...options, |
| 3438 | increment: false |
| 3439 | }); |
| 3440 | } |
| 3441 | |
| 3442 | static _optionsMustContainWhere(options) { |
| 3443 | assert(options && options.where, class="st">'Missing where attribute in the options parameter'); |
no test coverage detected