Comparing version 2.15.3 to 2.16.0
@@ -354,2 +354,3 @@ /* UNIQORM | ||
* | ||
* @param {*} [keyValues] | ||
* @param {Object} [values] | ||
@@ -365,3 +366,22 @@ * @param {Object} [options] | ||
*/ | ||
update(values, options = {}) { | ||
update(keyValues, values, options = {}) { | ||
return this.updateMany(values, merge({ | ||
where: this._prepareKeyValues(keyValues) | ||
}, options, {adjunct: true})); | ||
} | ||
/** | ||
* Performs update | ||
* | ||
* @param {Object} [values] | ||
* @param {Object} [options] | ||
* @param {Object|Array} [options.where] | ||
* @param {Boolean} [options.autoCommit] | ||
* @param {Object} [options.connection] | ||
* @param {Boolean} [options.silent] | ||
* @param {*} [options.context] | ||
* @param {string|Array<string>} [options.returning] | ||
* @return {Promise<{executeTime:number, queriesExecuted:number, rowsAffected:number, instances:Array<Object>}>} | ||
*/ | ||
updateMany(values, options = {}) { | ||
return promisify(() => { | ||
@@ -368,0 +388,0 @@ |
{ | ||
"name": "uniqorm", | ||
"description": "Multi dialect and multi schema ORM framework for enterprise level NodeJS applications", | ||
"version": "2.15.3", | ||
"version": "2.16.0", | ||
"author": "Panates Ltd.", | ||
@@ -37,6 +37,6 @@ "contributors": [ | ||
"eslint-config-google": "^0.12.0", | ||
"fecha": "^3.0.2", | ||
"fecha": "^3.0.3", | ||
"glob": "^7.1.3", | ||
"mocha": "^6.1.2", | ||
"nyc": "^13.3.0", | ||
"mocha": "^6.1.4", | ||
"nyc": "^14.0.0", | ||
"rejected-or-not": "^1.0.1", | ||
@@ -43,0 +43,0 @@ "sqb": "^3.7.6", |
98898
3243