Merge pull request #1252 from strongloop/fix/updateall-deleteall-jsdoc
Improve API docs
This commit is contained in:
commit
e69eba6560
|
@ -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) {
|
||||
|
@ -819,6 +822,8 @@ PersistedModel.currentCheckpoint = function(cb) {
|
|||
* @callback {Function} [callback] Callback function called with `(err, conflicts)` arguments.
|
||||
* @param {Error} err Error object; see [Error object](http://docs.strongloop.com/display/LB/Error+object).
|
||||
* @param {Conflict[]} conflicts A list of changes that could not be replicated due to conflicts.
|
||||
* @param {Object] checkpoints The new checkpoints to use as the "since"
|
||||
* argument for the next replication.
|
||||
*/
|
||||
|
||||
PersistedModel.replicate = function(since, targetModel, options, callback) {
|
||||
|
|
Loading…
Reference in New Issue