Skip to content

Commit 55b42a6

Browse files
authored
CXX-1774 - Documentation for countDocuments MUST mention estimatedDocumentCount (mongodb#805)
Update Doxygen text for count_documents() to mention estimated_document_count(), some users found it difficult to discover one from the other. https://jira.mongodb.org/browse/CXX-1774 Signed-off-by: Jesse Williamson <[email protected]>
1 parent dc2b304 commit 55b42a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mongocxx/collection.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ class MONGOCXX_API collection {
413413
///
414414
/// @throws mongocxx::query_exception if the count operation fails.
415415
///
416+
/// @note For a fast count of the total documents in a collection, see estimated_document_count().
417+
/// @see mongocxx::estimated_document_count
418+
///
416419
std::int64_t count_documents(bsoncxx::document::view_or_value filter,
417420
const options::count& options = options::count());
418421

@@ -449,6 +452,8 @@ class MONGOCXX_API collection {
449452
///
450453
/// @throws mongocxx::query_exception if the count operation fails.
451454
///
455+
/// @see mongocxx::count_documents
456+
///
452457
std::int64_t estimated_document_count(
453458
const options::estimated_document_count& options = options::estimated_document_count());
454459
///

0 commit comments

Comments
 (0)