From 1ba5dc1764741de03204ac3cbe2554dd61477cbc Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Tue, 7 Feb 2023 16:24:09 -0300 Subject: [PATCH] docs: adding mssing countDocuments documentation --- docs/source/api/collections.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/source/api/collections.md b/docs/source/api/collections.md index fea0bebf04..9d59cbff9f 100644 --- a/docs/source/api/collections.md +++ b/docs/source/api/collections.md @@ -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