+ Anywhere a callback is passed to a query in Mongoose, the callback follows the pattern `callback(error, results)`. What `results` is depends on the operation: For `findOne()` it is a [potentially-null single document](./docs/api.html#model_Model.findOne), `find()` a [list of documents](./docs/api.html#model_Model.find), `count()` [the number of documents](./docs/api.html#model_Model.count), `update()` the [number of documents affected](./docs/api.html#model_Model.update), etc. The [API docs for Models](./docs/api.html#model-js) provide more detail on what is passed to the callbacks.
0 commit comments