Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(queries): fixed broken links #12790

Merged
merged 1 commit into from Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 16 additions & 16 deletions docs/queries.md
Expand Up @@ -5,21 +5,21 @@ for [CRUD operations](https://en.wikipedia.org/wiki/Create,_read,_update_and_del
Each of these functions returns a
[mongoose `Query` object](query.html#Query).

- [`Model.deleteMany()`](model.html#model_Model-deleteMany)
- [`Model.deleteOne()`](model.html#model_Model-deleteOne)
- [`Model.find()`](model.html#model_Model-find)
- [`Model.findById()`](model.html#model_Model-findById)
- [`Model.findByIdAndDelete()`](model.html#model_Model-findByIdAndDelete)
- [`Model.findByIdAndRemove()`](model.html#model_Model-findByIdAndRemove)
- [`Model.findByIdAndUpdate()`](model.html#model_Model-findByIdAndUpdate)
- [`Model.findOne()`](model.html#model_Model-findOne)
- [`Model.findOneAndDelete()`](model.html#model_Model-findOneAndDelete)
- [`Model.findOneAndRemove()`](model.html#model_Model-findOneAndRemove)
- [`Model.findOneAndReplace()`](model.html#model_Model-findOneAndReplace)
- [`Model.findOneAndUpdate()`](model.html#model_Model-findOneAndUpdate)
- [`Model.replaceOne()`](model.html#model_Model-replaceOne)
- [`Model.updateMany()`](model.html#model_Model-updateMany)
- [`Model.updateOne()`](model.html#model_Model-updateOne)
- [`Model.deleteMany()`](api.html#model_Model-deleteMany)
- [`Model.deleteOne()`](api.html#model_Model-deleteOne)
- [`Model.find()`](api.html#model_Model-find)
- [`Model.findById()`](api.html#model_Model-findById)
- [`Model.findByIdAndDelete()`](api.html#model_Model-findByIdAndDelete)
- [`Model.findByIdAndRemove()`](api.html#model_Model-findByIdAndRemove)
- [`Model.findByIdAndUpdate()`](api.html#model_Model-findByIdAndUpdate)
- [`Model.findOne()`](api.html#model_Model-findOne)
- [`Model.findOneAndDelete()`](api.html#model_Model-findOneAndDelete)
- [`Model.findOneAndRemove()`](api.html#model_Model-findOneAndRemove)
- [`Model.findOneAndReplace()`](api.html#model_Model-findOneAndReplace)
- [`Model.findOneAndUpdate()`](api.html#model_Model-findOneAndUpdate)
- [`Model.replaceOne()`](api.html#model_Model-replaceOne)
- [`Model.updateMany()`](api.html#model_Model-updateMany)
- [`Model.updateOne()`](api.html#model_Model-updateOne)

A mongoose query can be executed in one of two ways. First, if you
pass in a `callback` function, Mongoose will execute the query asynchronously
Expand Down Expand Up @@ -57,7 +57,7 @@ will be null. If the query is successful, the `error` parameter will be null, an

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](api/model.html#model_Model-findOne), `find()` a [list of documents](api/model.html#model_Model-find), `count()` [the number of documents](api/model.html#model_Model-count), `update()` the [number of documents affected](api/model.html#model_Model-update), etc.
The [API docs for Models](api/model-js.html#model-js) provide more detail on what is passed to the callbacks.
The [API docs for Models](api/model.html) provide more detail on what is passed to the callbacks.

Now let's look at what happens when no `callback` is passed:

Expand Down