Why You Should Execute jOOQ Queries With jOOQ
JOOQ
by lukaseder
2w ago
Previously on this blog, I’ve written a post explaining why you should use jOOQ’s code generator, despite the possibility of using jOOQ without it. In a similar fashion, as I’ve answered numerous jOOQ questions on Stack Overflow, where someone used jOOQ to build a query, but then executed it elsewhere, including on: jOOQ itself isn’t ..read more
Visit website
JOOQ’s R2DBC LoggingConnection to log all SQL statements
JOOQ
by lukaseder
2w ago
jOOQ already has a LoggingConnection (see also the manual), which acts as a JDBC proxy Connection to log all SQL statements that are executed by any JDBC client (including Hibernate, MyBatis, JdbcTemplate, native JDBC, etc.). Starting from jOOQ 3.18.0, 3.17.7, and 3.16.13, a LoggingConnection is now also available for R2DBC clients to log all reactive ..read more
Visit website
When to Use jOOQ and When to Use Native SQL
JOOQ
by lukaseder
2M ago
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. The jOOQ manual is full of side by side examples of the same query, e.g. Using jOOQ: Using native SQL: In the native SQL ..read more
Visit website
LATERAL is Your Friend to Create Local Column Variables in SQL
JOOQ
by lukaseder
3M ago
The standard SQL WITH clause has been tremendously helpful in structuring SQL queries. Instead of nesting everything in unreadable derived tables like this: People have started moving the logic up front, just like in any other programming language, where we declare things first, lexically, then use them: Both queries will produce the 5 actors with ..read more
Visit website
Calling Procedures with Default Parameters using JDBC or jOOQ
JOOQ
by lukaseder
3M ago
Using jOOQ’s code generator to call stored procedures is a popular reason to use jOOQ. For example, when you have a procedure like the following Oracle PL/SQL procedure: jOOQ will generate code for you to call very simply, like this: This will execute the following, taking care of binding all IN and OUT parameters for ..read more
Visit website
Using jOOQ’s Implicit Join From Within the JOIN .. ON Clause
JOOQ
by lukaseder
5M ago
Starting with jOOQ 3.11, type safe implicit JOIN have been made available, and they’ve been enhanced to be supported also in DML statements in jOOQ 3.17. Today, I’d like to focus on a somewhat weird but really powerful use-case for implicit JOIN, when joining additional tables from within an explicit JOIN‘s ON clause. The use ..read more
Visit website
A Brief Overview over the Most Common jOOQ Types
Java, SQL and jOOQ.
by lukaseder
5M ago
For new users working with jOOQ for the first time, the number of types in the jOOQ API can be overwhelming. The SQL language doesn’t have many such “visible” types, although if you think about SQL the way jOOQ does, then they’re there just the same, but hidden from users via an English style syntax ..read more
Visit website
How to Plot an ASCII Bar Chart with SQL
Jooq
by lukaseder
5M ago
No need for expensive Tableau subscriptions. Ditch Microsoft Excel. Just use native PostgreSQL to quickly visualise your data! Here’s an idea I had for a while. As you may know, jOOQ can produce fancy charts from your jOOQ results. But that requires you use jOOQ, and you may not be using jOOQ, because you’re not ..read more
Visit website
The Second Best Way to Fetch a Spring Data JPA DTO Projection
JOOQ
by lukaseder
5M ago
I’ve just stumbled upon this great post by Vlad Mihalcea, titled The Best Way to Fetch a Spring Data JPA DTO Projection. It got some nice traction on reddit, too. This is such a nice use-case and apt solution, I wanted to quickly show the second best way of doing the same, with jOOQ this ..read more
Visit website
Cannot resolve symbol ‘VERSION_3_17’ in jOOQ generated code
JOOQ
by lukaseder
5M ago
Starting with jOOQ 3.16 and #12601, there may be a compilation error with a message like this in your jOOQ generated code: [ERROR] …/DefaultCatalog.java:[53,73] cannot find symbol[ERROR] symbol: variable VERSION_3_17[ERROR] location: class org.jooq.Constants Typically, this error is mixed with other compilation errors in generated code. Its purpose is to help troubleshoot these other compilation errors ..read more
Visit website

Follow JOOQ on Feedspot

Continue with Google
OR