Programming
HR
When to Use jOOQ and When to Use Native SQL
['View All Posts Lukaseder', 'I Made Jooq']
Java, SQL and jOOQ.
A frequently encountered doubt people have when using jOOQ is to decide when a “complex” query should be written using jOOQ API vs. when it should be implemented using native SQL. In the native SQL case, do note that you can still use jOOQ’s plain SQL templating API, ideally using Java text blocks, so you can still profit from a few jOOQ things, including: While it is totally possible to follow a test driven development (TDD) approach to developing your jOOQ queries purely in Java, and running them preferably on testcontainers as we’ve described here, it may well be that you’re more at ease writing your SQL query in native SQL, e.g. in Dbeaver or any other SQL editor of your choice.