Updated mongodb and applied deprecated `count` changes
Pre-release
Pre-release
The new mongodb v 4.4.0 to be exact deprecated collection.count()
but this won't be a breaking change for us as the new recommended countDocuments
and estimatedDocumentCount
has been applied.
Model.count(filter?, options?) // is same as native().countDocuments()
Model.countEstimated() // is same as native().estimatedDocumentCount()
It is recommended you use count
when you have a query filter and countEstimated
when you have none.
Nevertheless xpress-mongo's count
uses countEstimated
when no query is provided.