Fix JSdocs per #888
This commit is contained in:
parent
8f8db5b69a
commit
fc31f37a83
|
@ -103,7 +103,8 @@ PersistedModel.upsert = PersistedModel.updateOrCreate = function upsert(data, ca
|
|||
* Find one record, same as `find`, but limited to one object. Returns an object, not collection.
|
||||
* If not found, create the object using data provided as second argument.
|
||||
*
|
||||
* @param {Object} query Search conditions: {where: {test: 'me'}}.
|
||||
* @param {Object} where Where clause, such as `{where: {test: 'me'}}`
|
||||
* <br/>see [Where filter](http://docs.strongloop.com/display/public/LB/Where+filter).
|
||||
* @param {Object} data Object to create.
|
||||
* @param {Function} cb Callback called with `cb(err, instance)` signature.
|
||||
*/
|
||||
|
@ -118,7 +119,7 @@ PersistedModel.findOrCreate._delegate = true;
|
|||
* Check whether a model instance exists in database.
|
||||
*
|
||||
* @param {id} id Identifier of object (primary key value)
|
||||
* @param {Function} cb Callback function called with (err, exists: Bool)
|
||||
* @param {Function} cb Callback function called with `(err, exists: Bool)`
|
||||
*/
|
||||
|
||||
PersistedModel.exists = function exists(id, cb) {
|
||||
|
@ -175,8 +176,6 @@ PersistedModel.find = function find(params, cb) {
|
|||
* <br/>See [Fields filter](http://docs.strongloop.com/display/LB/Fields+filter).
|
||||
* @property {String|Object|Array} include See PersistedModel.include documentation.
|
||||
* <br/>See [Include filter](http://docs.strongloop.com/display/LB/Include+filter).
|
||||
* @property {Number} limit Maximum number of instances to return.
|
||||
* <br/>See [Limit filter](http://docs.strongloop.com/display/LB/Limit+filter).
|
||||
* @property {String} order Sort order: either "ASC" for ascending or "DESC" for descending.
|
||||
* <br/>See [Order filter](http://docs.strongloop.com/display/LB/Order+filter).
|
||||
* @property {Number} skip Number of results to skip.
|
||||
|
@ -196,13 +195,14 @@ PersistedModel.findOne = function findOne(params, cb) {
|
|||
};
|
||||
|
||||
/**
|
||||
* Destroy all model instances that match the optional `filter` specification.
|
||||
* Destroy all model instances that match the optional `where` specification.
|
||||
*
|
||||
* @options {Object} [where] Optional where filter JSON object; see below.
|
||||
* @property {Object} where Where clause, like
|
||||
* ```
|
||||
* { key: val, key2: {gt: 'val2'}, ...}
|
||||
* ```
|
||||
* <br/>See [Where filter](http://docs.strongloop.com/display/LB/Where+filter).
|
||||
*
|
||||
* @param {Function} [cb] - callback called with `(err)`.
|
||||
*/
|
||||
|
@ -237,6 +237,7 @@ PersistedModel.deleteAll = PersistedModel.destroyAll;
|
|||
* ```
|
||||
* { key: val, key2: {gt: 'val2'}, ...}
|
||||
* ```
|
||||
* <br/>see [Where filter](http://docs.strongloop.com/display/public/LB/Where+filter).
|
||||
* @param {Object} data Changes to be made
|
||||
* @param {Function} cb Callback function called with (err, count).
|
||||
*/
|
||||
|
@ -269,8 +270,8 @@ PersistedModel.removeById = PersistedModel.destroyById;
|
|||
PersistedModel.deleteById = PersistedModel.destroyById;
|
||||
|
||||
/**
|
||||
* Return the number of records that match the optional filter.
|
||||
* @options {Object} [filter] Optional where filter JSON object; see below.
|
||||
* Return the number of records that match the optional "where" filter.
|
||||
* @options {Object} [where] Optional where filter JSON object; See [Where filter](http://docs.strongloop.com/display/LB/Where+filter).
|
||||
* @property {Object} where Where clause, like
|
||||
* ```
|
||||
* { key: val, key2: {gt: 'val2'}, ...}
|
||||
|
|
Loading…
Reference in New Issue