Merge pull request #12502 from meteor/add-mising-countDocuments-docs

docs: adding missing countDocuments documentation
This commit is contained in:
Gabriel Grubba
2023-02-09 10:13:42 -03:00
committed by GitHub

View File

@@ -216,6 +216,15 @@ collections will be empty.
Equivalent to [`find`](#find)`(selector, options).`[`fetch`](#fetch)`()[0]` with
`options.limit = 1`.
{% apibox "Mongo.Collection#countDocuments" %}
Similar to `count`, but returns a `Promise`. For a faster version, see `estimatedDocumentCount`.
{% apibox "Mongo.Collection#estimatedDocumentCount" %}
Returns a `Promise` that resolves to the number of documents in the cursor's result set. The count is an estimate and not guaranteed to be exact.
{% apibox "Mongo.Collection#insert" %}
Add a document to the collection. A document is just an object, and