Database Pagination is something I have coded at every employer I have worked at. Here is a look at how I would go about it in 2020.
The requirements for this incarnation:
- SQL server database
- Support for querying ordering columns of more than one SQL type
- One database query should go across the wire, and we should both the Total Row Count as well as the Rows of the current page
Things that will be improved shortly:
- support for resilency
- support for isolation level / read uncommitted
- making more generic as more use cases are used
- validation of invalid requests
If you have any feedback please leave it on this blog or the GitHub Gist.