3.15.0 Release with Support for R2DBC, Nested ROW, ARRAY, and MULTISET types,...
R2DBC What a lot of users have been waiting for: jOOQ 3.15 is reactive, thanks to the new native R2DBC integration. Recent versions already implemented the reactive streams Publisher SPI, but now...
View ArticleReactive SQL with jOOQ 3.15 and R2DBC
One of the biggest new features of the recently released jOOQ 3.15 is its new support for reactive querying via R2DBC. This has been a highly popular feature request, and we finally delivered on it....
View ArticleAd-hoc Data Type Conversion with jOOQ 3.15
jOOQ 3.15 shipped with a ton of new features, the most important ones being: MULTISET support (type safe, nested collections)Reactive SQL support via R2DBC A very useful, lesser known new feature is...
View ArticleStandard SQL/JSON – The Sobering Parts
It’s been almost 1 year now since jOOQ 3.14 was released in October 19, 2020 with SQL/JSON (and SQL/XML) support. Half a year later, we’ve released jOOQ 3.15 with MULTISET support, which builds on top...
View ArticleFormatting ASCII Charts With jOOQ
A very little known feature in jOOQ is the Formattable.formatChart() capability, which allows for formatting any jOOQ result as an ASCII chart. This can be useful for quick plotting of results in your...
View Article10 Things You Didn’t Know About jOOQ
jOOQ has been around for a while – since around 2009 as a publicly available library, and since 2013 as a commercially licensed product. A lot of things have happened in 12 years. Here are 10 things...
View ArticleMySQL’s allowMultiQueries flag with JDBC and jOOQ
MySQL’s JDBC connector has a security feature called allowMultiQueries, which defaults to false. When turned off, it prevents using a useful, but potentially dangerous feature in MySQL via JDBC: try...
View ArticleVendor Agnostic, Dynamic Procedural Logic with jOOQ
One of the strengths of modern RDBMS is the capability to mix the powerful SQL language with procedural code. SQL is a 4th generation programming language (4GL), and as such, extremely well suited for...
View ArticleUsing jOOQ to write vendor agnostic SQL with JPA’s native query or @Formula
If your legacy JPA application is using occasional native queries or Hibernate @Formula or Spring Data @Query annotation with vendor specific native SQL embedded in it, you can use jOOQ’s parsing...
View ArticleUsing Testcontainers to Generate jOOQ Code
Database first is at the core of jOOQ’s design. jOOQ has been made primarily for classic systems the database is always there and always has been and will never leave. This is because we think “data...
View ArticleUse jOOλ’s Sneaky Throw to Avoid Checked Exceptions
Don’t you hate how you have to wrap checked exception throwing code in static initialisers? E.g. you cannot write this in Java: public class Test { static final Class<?> klass =...
View ArticleThe jOOQ Parser Ignore Comment Syntax
jOOQ’s parser can’t parse every possible SQL syntax. Try this random PostgreSQL syntax: ALTER SYSTEM RESET ALL And the jOOQ parser will complain: DOMAIN, INDEX, SCHEMA, SEQUENCE, SESSION, TABLE, TYPE,...
View ArticleWrite C-Style Local Static Variables in Java 16
Java 16 includes an improvement that makes the language a bit more regular via JEP 395. The JEP says: Static members of inner classes It is currently specified to be a compile-time error if an inner...
View ArticleFunctional Dependencies in SQL GROUP BY
The SQL standard knows an interesting feature where you can project any functional dependencies of a primary (or unique) key that is listed in the GROUP BY clause without having to add that functional...
View ArticleJava’s Checked Exceptions Are Just Weird Union Types
This fun fact has been on my mind for a while, and a recent reddit thread about “Smuggling Checked Exceptions with Sealed Interfaces” made me write this post here. Namely, Java had union types before...
View ArticlePostgreSQL 14’s enable_memoize For Improved Performance of Nested Loop Joins
I’ve recently discovered a pleasant new addition to PostgreSQL 14, the new enable_memoize flag that improves the performance of some nested loop joins where statistics hint at this being appropriate....
View ArticleFun with PostGIS: Mandelbrot Set, Game of Life, and More
The upcoming jOOQ 3.16 will finally offer support for the various RDBMS GIS extensions via issue #982. This is great news per se, and will be covered in a future blog post, when the integration is...
View ArticleWhy You Should Use jOOQ With Code Generation
I’m answering many jOOQ questions on Stack Overflow, and a lot of times. The problem has the same cause: People not using jOOQ’s code generator. The main reason people seem not to be using it, is...
View ArticleUsing JDK Collectors to De-duplicate parent/child nested collections
In classic SQL (i.e. before jOOQ’s awesome MULTISET operator), nested collections were fetched using ordinary (outer) joins. An example of such a query would be a query running against the sakila...
View ArticleHow to customise a jOOQ Configuration that is injected using Spring Boot
Starting from Spring Boot 2.5, there’s a handy new callback that you can implement, called DefaultConfigurationCustomizer, where the word DefaultConfiguration corresponds to jOOQ’s...
View Article