Fix API doc for updateAll/deleteAll
Based on changes made in https://github.com/strongloop/loopback/issues/1167 https://github.com/strongloop/loopback-datasource-juggler/pull/540
This commit is contained in:
parent
4a8c3be8f4
commit
caf53f72c1
|
@ -219,8 +219,10 @@ PersistedModel.findOne = function findOne(params, cb) {
|
|||
* ```
|
||||
* <br/>See [Where filter](http://docs.strongloop.com/display/LB/Where+filter).
|
||||
*
|
||||
* @callback {Function} callback Optional callback function called with `(err)` argument.
|
||||
* @callback {Function} callback Optional callback function called with `(err, info)` arguments.
|
||||
* @param {Error} err Error object; see [Error object](http://docs.strongloop.com/display/LB/Error+object).
|
||||
* @param {Object} info Additional information about the command outcome.
|
||||
* @param {Number} info.count Number of instances (rows, documents) destroyed.
|
||||
*/
|
||||
|
||||
PersistedModel.destroyAll = function destroyAll(where, cb) {
|
||||
|
@ -243,7 +245,7 @@ PersistedModel.deleteAll = PersistedModel.destroyAll;
|
|||
* Example:
|
||||
*
|
||||
*```js
|
||||
* Employee.updateAll({managerId: 'x001'}, {managerId: 'x002'}, function(err, count) {
|
||||
* Employee.updateAll({managerId: 'x001'}, {managerId: 'x002'}, function(err, info) {
|
||||
* ...
|
||||
* });
|
||||
* ```
|
||||
|
@ -255,9 +257,10 @@ PersistedModel.deleteAll = PersistedModel.destroyAll;
|
|||
* <br/>see [Where filter](http://docs.strongloop.com/display/public/LB/Where+filter).
|
||||
* @param {Object} data Object containing data to replace matching instances, if any.
|
||||
*
|
||||
* @callback {Function} callback Callback function called with `(err, count)` arguments. Required.
|
||||
* @callback {Function} callback Callback function called with `(err, info)` arguments. Required.
|
||||
* @param {Error} err Error object; see [Error object](http://docs.strongloop.com/display/LB/Error+object).
|
||||
* @param {Number} count Number of instances updated.
|
||||
* @param {Object} info Additional information about the command outcome.
|
||||
* @param {Number} info.count Number of instances (rows, documents) updated.
|
||||
*
|
||||
*/
|
||||
PersistedModel.updateAll = function updateAll(where, data, cb) {
|
||||
|
|
Loading…
Reference in New Issue