blinkdb-js/blinkdb

How to count the entries effectively?

shtse8 opened this issue · 2 comments

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.

Yep, that's currently the only way.

I'll implement a count function as soon as possible.

count() is now implemented in a more performant way than this method in the latest release.