My wife came to the office today and saw my console compiling stuff and didn't believe I actually do this matrix shit other than just to impress her 😅
Lukas Eder
@lukaseder.bsky.social
Java Champion, creator of jOOQ, the best way to write SQL in Java. Will mostly post about Java, SQL, jOOQ, programming humour, and write at https://blog.jooq.org
Do you prefer working with casts over UDT constructors? Starting with jOOQ 3.22, type safe UDT casts will be available
You can join tables with common column names with t1 JOIN t2 USING ( col ) But this leads to a trap! With t1 JOIN t2 USING ( c1 ) JOIN t3 USING ( c2 ) With c2 in just t2 and t3 this works But add c2 to t1 in the future it breaks 😖 @lukaseder.bsky.social demos
Avoiding SQL Ambiguities caused by JOIN USING and NATURAL JOIN
Discover the pitfalls of using SQL's NATURAL JOIN and JOIN USING syntax. Learn best practices for joining tables in production queries.
buff.ly
Fun fact: it is legal for a switch statement to have no cases at all
It's funny how some customers explicitly forbid using their logos on the jOOQ website, only for their engineers to tell just about anyone that they're using jOOQ at every occasion as well as talk to me about it in public 😅
There are joins that can only return rows from the left table Semi join => rows matching the right (IN or EXISTS) Anti join => rows not matching the right (NOT IN or NOT EXISTS) @lukaseder.bsky.social makes the case these should have their own #SQL syntax
Semi Join and Anti Join Should Have Their Own Syntax in SQL
Relational algebra nicely describes the various operations that we know in SQL as well from a more abstract, formal perspective. One of the most common relational JOIN operations is the “equi…
buff.ly
Good news for PostgreSQL / pgjdbc users! There's work on binary UDT serialisation support via JDBC's SQLData API: github.com/pgjdbc/pgjdb... I'm adding experimental support for it in jOOQ: github.com/jOOQ/jOOQ/is... This should speed up UDT support quite a bit!
feat: type cache rework, codec API, and composite-type round-trip by vlsi · Pull Request #3062 · pgjdbc/pgjdbc
The original goal was to fix TypeInfoCache: many Maps for navigating between oids, names, and other information — hard to maintain, hard to invalidate no support for identifier quoting or search_p...
github.com
Hey @vladmihalcea.bsky.social, do you have the source code for these benchmarks somewhere for reproduction? I want to check if the jOOQ single query case has some mapping related bottleneck (e.g. allocation) within jOOQ: www.youtube.com/watch?v=nrNY...
The best way to fetch multiple to-many relationships with Java by Vlad Mihalcea
YouTube video by v JUG
youtube.com
Just had a support case today where the solution was to use jOOQ's powerful anti join convenience: ctx .select(AUTHOR.ID) .from(AUTHOR) .where(notExists(AUTHOR .book())) That's something I often wish SQL had natively blog.jooq.org/simplifying-...
Mastering ANTI JOIN in SQL with jOOQ: A Complete Guide
Discover the power of ANTI JOIN in SQL with jOOQ. Learn how to simplify complex queries and optimize your database interactions.
blog.jooq.org
SQL's JOIN .. USING seems to be a really cool syntax to save time, but regrettably, it's not a good idea to use it in production queries: blog.jooq.org/why-join-usi...
Avoiding SQL Ambiguities caused by JOIN USING and NATURAL JOIN
Discover the pitfalls of using SQL's NATURAL JOIN and JOIN USING syntax. Learn best practices for joining tables in production queries.
blog.jooq.org
That looks like a fun session at @springio.net, wish I could be there :) 2026.springio.net/sessions/the...
Spring I/O • 13-15 • April • Barcelona 2026
2026.springio.net
A small but cool new feature of jOOQ 3.21's commercial editions: redacted columns, which do not expose their contents to DEBUG logs and other text output: blog.jooq.org/managing-sen...
Enhancing jOOQ Debug Logging for Safer Production Use
Discover jOOQ's powerful debug logging feature, perfect for developers, while ensuring sensitive data remains secure in production.
blog.jooq.org
After 18 years of maknig jOOQ, I'm still discovering such subtle differences where trying to insert a long string into a VARCHAR(n) column will raise an error if too long, but casting it to VARCHAR(n) will silently truncate it, e.g. in PostgreSQL: github.com/jOOQ/jOOQ/is... SQL is full of surprises
Bind variable casts truncate VARCHAR(n) ARRAY contents instead of letting the target INSERT raise an error · Issue #19814 · jOOQ/jOOQ
A recently added integration test creates this table: create table "t" ( "dummy" int, "s0" varchar[], "s3" varchar(3)[], primary key ("dummy") ) And asserts that if inserting array['abcd'] into s3,...
github.com
How many time zone bugs go undetected if developers are located in London (UTC)? and not some time zone where the offset produces tons of problems already at dev time?
👾New on CyberJAR: A jOOQ Deep Dive ORM makes you suffer? Let's explore a SQL-first approach to persistence with jOOQ! This video covers type-safe SQL in Java for complex queries, CTE pipelines, nested result mappings, and dynamic query composition: www.youtube.com/watch?v=J47i...
jOOQ Deep Dive: CTE, MULTISET, and SQL Pipelines
YouTube video by CyberJAR
youtube.com
Man, I just love my job. Interesting problems, happy customers, the joys of a great product market fit, flexible work hours (and not too many anymore). Thanks to all you jOOQ customers out there, making this dream-come-true possible!
Huh, interesting. It appears that PostgreSQL decided to go against the SQL standard here ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor> GR 4) b) i) says that empty tables should produce a JSON array with no elements (intuitively), not NULL. Why this behaviour in PG?
A View Is Not a Table: It Is a Controlled Integration Contract martinelli.ch/a-view-is-no...
A View Is Not a Table: It Is a Controlled Integration Contract - Martinelli
The recent article “Your Database Table is an awful API” claims that exposing database tables (or database-derived structures) as integration boundaries between systems is a bad idea. It warns about t...
martinelli.ch
Why Vaadin and jOOQ Are a Natural Fit for AI Driven Development martinelli.ch/why-vaadin-a...
Why Vaadin and jOOQ Are a Natural Fit for AI Driven Development - Martinelli
Over the last two years, I have been working heavily with AI-assisted and agent-based development. One observation keeps coming back: the choice of technology stack matters far more than most people t...
martinelli.ch
LEAD(x) IGNORE NULLS OVER(ORDER BY n) Not very often, but when I need IGNORE NULLS, then I really miss it in PostgreSQL. modern-sql.com/caniuse/T616
T616, “Null treatment option for LEAD and LAG functions”
T616, “Null treatment option for LEAD and LAG functions” in SQL
modern-sql.com
The love/hate Hibernate topic hasn't lost it's relevance: the video sparkled a nice conversation on Reddit www.reddit.com/r/java/comme... What is your stance, friends? What do you prefer, ORM or JDBC/jOOQ?
👾New on CyberJAR: Hibernate, Ditch or Double Down? What Hibernate does under the hood, in which scenarios it shines, how you can fall into a trap, and when SQL-first approach is better? And can you have the best of two worlds in one #Java app? Watch and find out -> www.youtube.com/watch?v=J12v...
This little API change allows for omitting some syntactic ceremony when working with EXISTS subqueries in jOOQ: github.com/jOOQ/jOOQ/is... E.g. you can now write: ctx. select(AUTHOR, exists(AUTHOR. book())) .from(AUTHOR) Instead of spelling out the complete correlated subquery.
Change exists(Select<?>) to exists(TableLike<?>) for convenience · Issue #19568 · jOOQ/jOOQ
When checking for existence of records in a table, it could be convenient to be able to write exists(MY_TABLE) instead of exists(selectOne().from(MY_TABLE)). This is especially true when working wi...
github.com
One Query, Complete Object Graphs: Nested DTOs with jOOQ MULTISET martinelli.ch/one-query-co... by @martinelli.ch
One Query, Complete Object Graphs: Nested DTOs with jOOQ MULTISET - Martinelli
In my previous post about Open Session in View, I explored how this default Spring Boot setting can hide serious performance problems. The N+1 query problem sits behind a system that looks correct in ...
martinelli.ch
“There are only two tragedies in life: one is not getting what one wants, and the other is getting it.” ― Oscar Wilde
My disappointment when SQL dialects choose this kind of name resolution strategy is very very deep
Man, I've been doing jOOQ for 15+ years now and I still write flaky tests due to missing ORDER BY clauses, and thus non-deterministic result set ordering 🫠