Open tomcounsell opened 2 years ago
first attempt at a PR here! please review and propose changes to match code style and tests.
There was not an obvious way to implement this much needed feature. Using the AGGREGATE GROUP BY REDUCE feature may not be the best choice. Would love to find a better alternative.
Currently, this implementation is not working for queries where multiple find parameters match the same record. It will count duplicate matches twice. So the current implementation works only for queries with single parameters and the base find().count()
use case.
.find().count()
will return a count of the number of matching records for a query. This returns only the number of results without needing to collect the records. solves #283