PHP Classes

File: vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt

Recommend this page to a friend!
  Classes of LAGGOUNE Walid   MongoDB Queue PHP Query Execute   vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt   Download  
File: vendor/mongodb/mongodb/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: MongoDB Queue PHP Query Execute
Query and execute multiple queries using MongoDB
Author: By
Last change:
Date: 4 years ago
Size: 1,651 bytes
 

Contents

Class file image Download
============================================= MongoDB\\Collection::estimatedDocumentCount() ============================================= .. versionadded:: 1.4 .. default-domain:: mongodb .. contents:: On this page :local: :backlinks: none :depth: 1 :class: singlecol Definition ---------- .. phpmethod:: MongoDB\\Collection::estimatedDocumentCount() Gets an estimated number of documents in the collection using collection metadata. .. code-block:: php function countDocuments(array $options = []): integer This method has the following parameters: .. include:: /includes/apiargs/MongoDBCollection-method-estimateDocumentCount-param.rst The ``$options`` parameter supports the following options: .. include:: /includes/apiargs/MongoDBCollection-method-estimateDocumentCount-option.rst Return Values ------------- An estimated number of documents in the collection. Errors/Exceptions ----------------- .. include:: /includes/extracts/error-unexpectedvalueexception.rst .. include:: /includes/extracts/error-unsupportedexception.rst .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst Behavior -------- This method returns an estimate of the count of documents in the collection using collection metadata, rather than counting the documents or consulting an index. This method does not take a ``session`` option and cannot be executed within a transaction. See Also -------- - :manual:`count </reference/command/count>` command reference in the MongoDB manual - :phpmethod:`MongoDB\\Collection::countDocuments()`