Hello
I have used the Paginator in a number of places and I think the current implementation is not ideal.
For example, you have to query the whole set of data and pagniate through it. In case you have southands of items, then you are going to query all of them whenever you access a page that shows them.
A better aproach would be querying the only items required for the current page, and how do you calculate the pages? You can feed the total number of all items to the paginator, the paginator itself should be responsible only for handling the pagination, but not the data itself.
We can use LIMIT in MySQL or skip in MongoDB to limit the queryed data.
What do you think?
Regards