query=`UPDATE ${this.quoteTable(tableName)} SET ${values.join(',')} WHERE rowid IN (SELECT rowid FROM ${this.quoteTable(tableName)}${this.whereQuery(where,whereOptions)} LIMIT ${this.escape(options.limit)})`;
...
...
@@ -264,8 +268,11 @@ class SQLiteQueryGenerator extends MySqlQueryGenerator {
* @returns {Promise<Model[],?number>} returns an array of affected rows and affected count with `options.returning: true`, whenever supported by dialect
*/
staticdecrement(fields,options){
options=_.defaults({increment:false},options,{
by:1
});
options={
by:1,
...options,
increment:false
};
returnthis.increment(fields,options);
}
...
...
@@ -3652,11 +3661,11 @@ class Model {
thrownewError('The second argument was removed in favor of the options object.');