vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function MongoCollection.countDocuments

Returns the count of documents that match the query for a collection or view.

ulong countDocuments(T) (
  T filter,
  CountOptions options = CountOptions.init
);

The method wraps the $group aggregation stage with a $sum expression to perform the count.

Throws Exception if a DB communication error occurred.

See Also

https://www.mongodb.com/docs/manual/reference/method/db.collection.countDocuments/

Authors

Sönke Ludwig

Copyright

© 2012-2016 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.