Keyset/Seek pagination with Springs repository pattern
Inspired by the JOOQ synthetic SEEK clause and use-the-index-luke call to arms blog post.
This project makes use of Testcontainers when not running with default spring profile. If you wish to run the test suite against one of these databases you need to make sure you have Docker installed. The version required can be found here
To run the test suite (Using a H2 embedded database) you can run the following command:
mvn clean test
To target a different database, you can set the active spring profile, for example:
mvn -Dspring.profiles.active=postgres clean test
The current list of databases supported:
Database | Profile value |
---|---|
Postgresql | postgres |
MySQL | mysql |