How to count the entries effectively?
shtse8 opened this issue · 2 comments
shtse8 commented
I can't find any example how to get the total rows in collections effectively.
Currently, I am using
const total = await many(users).then(x => x.length)
But obviously it is not a good approach.
maradotwebp commented
Yep, that's currently the only way.
I'll implement a count function as soon as possible.
maradotwebp commented
count()
is now implemented in a more performant way than this method in the latest release.