igorbenav/fastcrud

Make counting "total_count" optional in get_multi

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
In some cases it is reduntant to calculate a total_count of objects in database. Especially if the database is huge and there are multiple filters in the query, it would make sense to ommit it.

Describe the solution you'd like
Add a flag to get_multi and get_multi_joned methods (possibly something else?) to optionally disable count call to database. The flag should be True by default, to maintain backwards compatibility. I am willing to contribute to that in PR, if getting approved.

Hey, @JakNowy, I think this is a good idea for the methods! I'm assigning it to you since you said you'd like to do it.