jaguar_orm
jaguar_orm copied to clipboard
Having a count method generated
Would be nice to have a count method generated to be able to count number of items from a where query a get a integer.
Because for now all we can do (a I know) is:
final items = await bean.findMany(bean.finder);
return items.length;
But it not optimized as you'll map all the objects just to get a count :/
Maybe there a better way @tejainece ?
@jaumard This is cool.
Jaguar_query already has count clause.
PR is welcome.