Summary
This was a relatively short chapter about pagination and dynamic queries. As you saw, jOOQ excels on both topics and provides support and APIs that allow us to intuitively and quickly implement the simplest to the most complex scenarios. In the first part of this chapter, we covered offset and keyset pagination (including infinite scrolling, the fancy DENSE_RANK()
, and the ROW_NUMBER()
approach). In the second part, we covered dynamic queries, including the ternary operator, the Comparator
API, the SelectQuery
, InsertQuery
, UpdateQuery
, and DeleteQuery
APIs, and their respective generic and functional dynamic queries.
In the next chapter, we will talk about exploiting SQL functions.