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(count): more explicit documentation that count is deprecated #2152

Merged
merged 1 commit into from Oct 7, 2019
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
7 changes: 6 additions & 1 deletion lib/collection.js
Expand Up @@ -1401,7 +1401,12 @@ Collection.prototype.indexInformation = function(options, callback) {
*/

/**
* Count number of matching documents in the db to a query.
* An estimated count of matching documents in the db to a query.
*
* **NOTE:** This method has been deprecated, since it does not provide an accurate count of the documents
* in a collection. To obtain an accurate count of documents in the collection, use {@link Collection#countDocuments countDocuments}.
* To obtain an estimated count of all documents in the collection, use {@link Collection#estimatedDocumentCount estimatedDocumentCount}.
*
* @method
* @param {object} [query={}] The query for the count.
* @param {object} [options] Optional settings.
Expand Down