felixmosh / knex-paginate

An extension of Knex's query builder with `paginate` method that will help with your pagination tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request: Pass params to attachPaginate for global usage

owen-soak opened this issue · comments

I'd love to be able to pass isLengthAware: true to attachPaginate() as a param and have this take effect globally on all usages of paginate.

I think that it is possible, but not sure why would you like to do that.

Pay attention that isLengthAware makes an additional db query.

This would be a nice feature. I am aware that it would make an additional query but I need to know the total length for every request.

Would you like to make a PR for this?