diff --git a/lib/persisted-model.js b/lib/persisted-model.js index 4a74cde7..c7a288b2 100644 --- a/lib/persisted-model.js +++ b/lib/persisted-model.js @@ -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'}}` + *
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) { *
See [Fields filter](http://docs.strongloop.com/display/LB/Fields+filter). * @property {String|Object|Array} include See PersistedModel.include documentation. *
See [Include filter](http://docs.strongloop.com/display/LB/Include+filter). - * @property {Number} limit Maximum number of instances to return. - *
See [Limit filter](http://docs.strongloop.com/display/LB/Limit+filter). * @property {String} order Sort order: either "ASC" for ascending or "DESC" for descending. *
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'}, ...} * ``` + *
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'}, ...} * ``` + *
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'}, ...}