# jooq-in-use

Published articles for jooq-in-use.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Simplifying ANTI JOIN with jOOQ Syntax

DevFeed: [Simplifying ANTI JOIN with jOOQ Syntax](<https://devfeed.tech/articles/simplifying-anti-join-with-jooq-syntax-28960.md>)

Original publisher: [Read original article](<https://blog.jooq.org/simplifying-anti-join-with-jooq-syntax/>)

Author: lukaseder

Published: 2026-05-07T11:26:46Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>), [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [databricks](<https://devfeed.tech/topics/databricks.md>)

Tags: [anti-join](<https://devfeed.tech/tags/anti-join.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [databricks](<https://devfeed.tech/tags/databricks.md>), [join-paths](<https://devfeed.tech/tags/join-paths.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-syntax](<https://devfeed.tech/tags/sql-syntax.md>)

### AI overview

The article explains how to express an anti join more concisely with jOOQ. It shows that jOOQ can render native anti-join syntax for supported RDBMSs such as ClickHouse and Databricks, translate it for other systems, and use implicit correlated path joins introduced in jOOQ 3.19.

### Source excerpt

ANTI JOIN is a very useful operator from relational algebra. Regrettably, only few dialects support it in terms of SQL syntax, as we've written earlier. In jOOQ, you can write it as follows: If your RDBMS supports this natively (e.g. ClickHouse, Databricks), then it is rendered as such. Otherwise, jOOQ will translate this to: But ... Continue reading Simplifying ANTI JOIN with jOOQ Syntax ->

## Managing Sensitive Data in jOOQ 3.21+ Logs

DevFeed: [Managing Sensitive Data in jOOQ 3.21+ Logs](<https://devfeed.tech/articles/managing-sensitive-data-in-jooq-3-21-logs-28956.md>)

Original publisher: [Read original article](<https://blog.jooq.org/managing-sensitive-data-in-jooq-3-21-logs/>)

Author: lukaseder

Published: 2026-03-27T12:45:19Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Logging](<https://devfeed.tech/topics/logging.md>), [sensitive data](<https://devfeed.tech/topics/sensitive-data.md>), [Security](<https://devfeed.tech/topics/security.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [csv](<https://devfeed.tech/tags/csv.md>), [debug-logging](<https://devfeed.tech/tags/debug-logging.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [json](<https://devfeed.tech/tags/json.md>), [logging](<https://devfeed.tech/tags/logging.md>), [logs](<https://devfeed.tech/tags/logs.md>), [maven](<https://devfeed.tech/tags/maven.md>), [redacted-columns](<https://devfeed.tech/tags/redacted-columns.md>), [security](<https://devfeed.tech/tags/security.md>), [sensitive-data](<https://devfeed.tech/tags/sensitive-data.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

This article explains how jOOQ debug logging can expose query bind values and fetched records in application logs, creating security concerns in production. It describes a code-generation configuration available in commercial jOOQ distributions to mask exported data, including text, HTML, and optionally CSV, JSON, or XML output.

### Source excerpt

One of jOOQ's most popular feature is the out-of-the-box debug logging experience. jOOQ developers find this feature very useful when developing their applications. Assuming you run a jOOQ query and configure your logger to print DEBUG log output: When this query is executed, your log output might contain something like this: Executing query : select ... Continue reading Managing Sensitive Data in jOOQ 3.21+ Logs ->

## A Hidden Benefit of Implicit Joins: Join Elimination

DevFeed: [A Hidden Benefit of Implicit Joins: Join Elimination](<https://devfeed.tech/articles/a-hidden-benefit-of-implicit-joins-join-elimination-28930.md>)

Original publisher: [Read original article](<https://blog.jooq.org/a-hidden-benefit-of-implicit-joins-join-elimination/>)

Author: lukaseder

Published: 2024-01-10T14:19:00Z

Content type: article

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [implicit-joins](<https://devfeed.tech/tags/implicit-joins.md>), [implicit-path-join](<https://devfeed.tech/tags/implicit-path-join.md>), [java](<https://devfeed.tech/tags/java.md>), [join-elimination](<https://devfeed.tech/tags/join-elimination.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-19](<https://devfeed.tech/tags/jooq-3-19.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [many-to-many-joins](<https://devfeed.tech/tags/many-to-many-joins.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [path-joins](<https://devfeed.tech/tags/path-joins.md>), [sql](<https://devfeed.tech/tags/sql.md>), [to-many-joins](<https://devfeed.tech/tags/to-many-joins.md>)

### AI overview

This article explains how jOOQ 3.19 can eliminate unnecessary tables from implicit path joins when no columns from those tables are referenced. Primary and foreign keys preserve equivalence, while referenced columns cause the table to remain in the join tree. The behavior applies to implicit path joins and depends on a flag that is disabled by default.

### Source excerpt

One of jOOQ's key features so far has always been to render pretty much exactly the SQL that users expect, without any surprises - unless some emulation is required to make a query work, of course. This means that while join elimination is a powerful feature of many RDBMS, it isn't part of jOOQ's feature ... Continue reading A Hidden Benefit of Implicit Joins: Join Elimination ->

## Workaround for MySQL's "can't specify target table for update in FROM clause" Error

DevFeed: [Workaround for MySQL's "can't specify target table for update in FROM clause" Error](<https://devfeed.tech/articles/workaround-for-mysql-s-can-t-specify-target-table-for-update-in-from-clause-error-28975.md>)

Original publisher: [Read original article](<https://blog.jooq.org/workaround-for-mysqls-cant-specify-target-table-for-update-in-from-clause-error/>)

Author: lukaseder

Published: 2023-12-20T14:20:29Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [MySQL](<https://devfeed.tech/topics/mysql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [bug](<https://devfeed.tech/topics/bug.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [for-update](<https://devfeed.tech/tags/for-update.md>), [from-clause](<https://devfeed.tech/tags/from-clause.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [mariadb](<https://devfeed.tech/tags/mariadb.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [table](<https://devfeed.tech/tags/table.md>), [target-table](<https://devfeed.tech/tags/target-table.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

The article explains MySQL error 1093, which occurs when an UPDATE statement references its target table in a FROM clause. It presents a jOOQ transformation as a workaround and notes that similar workarounds appear in the MySQL documentation.

### Source excerpt

In MySQL, you cannot do this: The UPDATE statement will raise an error as follows: SQL Error [1093] [HY000]: You can't specify target table 't' for update in FROM clause People have considered this to be a bug in MySQL for ages, as most other RDBMS can do this without any issues, including MySQL clones: ... Continue reading Workaround for MySQL's "can't specify target table for update in FROM clause" Error ->

## jOOQ DAOs, CRUD Access, and the N+1 Query Problem

DevFeed: [jOOQ DAOs, CRUD Access, and the N+1 Query Problem](<https://devfeed.tech/articles/to-dao-or-not-to-dao-28968.md>)

Original publisher: [Read original article](<https://blog.jooq.org/to-dao-or-not-to-dao/>)

Author: lukaseder

Published: 2023-12-06T13:41:52Z

Content type: opinion

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [CRUD](<https://devfeed.tech/topics/crud.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Domain-driven design (DDD)](<https://devfeed.tech/topics/domain-driven-design.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [account](<https://devfeed.tech/topics/account.md>)

Tags: [account](<https://devfeed.tech/tags/account.md>), [api](<https://devfeed.tech/tags/api.md>), [crud](<https://devfeed.tech/tags/crud.md>), [dao](<https://devfeed.tech/tags/dao.md>), [data](<https://devfeed.tech/tags/data.md>), [ddd](<https://devfeed.tech/tags/ddd.md>), [developers](<https://devfeed.tech/tags/developers.md>), [join](<https://devfeed.tech/tags/join.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [repository](<https://devfeed.tech/tags/repository.md>), [sql](<https://devfeed.tech/tags/sql.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This opinion article examines jOOQ's DAO API and the tendency to use DAOs or repositories for quick CRUD access. It argues that this approach can obscure query design and lead to inefficient patterns such as N+1 queries, while showing how explicit SQL and bulk operations can improve query structure and performance.

### Source excerpt

jOOQ's DAO API is one of jOOQ's most controversial features. When it was first implemented, it was implemented merely: There's a strong hint about the third bullet given how popular Spring Data's repository "pattern" is. A lot of developers just want to quickly fetch and store data, without giving individual queries much thought. A fun ... Continue reading To DAO or not to DAO ->

## How to Generate Package Private Code with jOOQ's Code Generator

DevFeed: [How to Generate Package Private Code with jOOQ's Code Generator](<https://devfeed.tech/articles/how-to-generate-package-private-code-with-jooq-s-code-generator-28941.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-generate-package-private-code-with-jooqs-code-generator/>)

Author: lukaseder

Published: 2023-06-28T15:54:18Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Java 9](<https://devfeed.tech/topics/java-9.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [code-generator](<https://devfeed.tech/tags/code-generator.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [java-9](<https://devfeed.tech/tags/java-9.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-code-generator](<https://devfeed.tech/tags/jooq-code-generator.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [modularity](<https://devfeed.tech/tags/modularity.md>), [package-private](<https://devfeed.tech/tags/package-private.md>), [visibility](<https://devfeed.tech/tags/visibility.md>), [visibility-modifier](<https://devfeed.tech/tags/visibility-modifier.md>)

### AI overview

This tutorial explains Java package-private visibility and shows how to configure jOOQ's code generator to generate package-private types. The approach can help keep generated jOOQ implementation details from leaking into client code.

### Source excerpt

Java's package private visibility is an underrated feature. When you omit any visibility modifier in Java, then the default (for most objects) is package private, i.e. the object is visible only to types in the same package: In fact, a compilation unit (the .java file) can contain multiple such classes. You don't have to create ... Continue reading How to Generate Package Private Code with jOOQ's Code Generator ->

## How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ

DevFeed: [How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ](<https://devfeed.tech/articles/how-to-pass-a-table-valued-parameter-to-a-t-sql-function-with-jooq-28943.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-pass-a-table-valued-parameter-to-a-t-sql-function-with-jooq/>)

Author: lukaseder

Published: 2023-04-25T12:16:30Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [sql-server](<https://devfeed.tech/topics/sql-server.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [code-generator](<https://devfeed.tech/tags/code-generator.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [t-sql](<https://devfeed.tech/tags/t-sql.md>), [table-valued-function](<https://devfeed.tech/tags/table-valued-function.md>), [table-valued-parameter](<https://devfeed.tech/tags/table-valued-parameter.md>)

### AI overview

This tutorial explains how to pass a Microsoft T-SQL table-valued parameter to a function using jOOQ. It covers native T-SQL and JDBC usage, then shows how jOOQ's code generator produces Java types and methods for calling the function and accessing its result rows.

### Source excerpt

Microsoft T-SQL supports a language feature called table-valued parameter (TVP), which is a parameter of a table type that can be passed to a stored procedure or function. For example, you may write: This function takes a table-valued parameter (TVP), and produces a result set containing the cross product of the parameter table with itself. ... Continue reading How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ ->

## How to use jOOQ's Converters with UNION Operations

DevFeed: [How to use jOOQ's Converters with UNION Operations](<https://devfeed.tech/articles/how-to-use-jooq-s-converters-with-union-operations-28947.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-use-jooqs-converters-with-union-operations/>)

Author: lukaseder

Published: 2023-03-02T11:18:17Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [ad-hoc-converter](<https://devfeed.tech/tags/ad-hoc-converter.md>), [converter](<https://devfeed.tech/tags/converter.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [multiset](<https://devfeed.tech/tags/multiset.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [union](<https://devfeed.tech/tags/union.md>)

### AI overview

This tutorial explains how jOOQ ad-hoc converters behave with UNION operations. Because conversion occurs on the client after JDBC retrieval, it does not affect server-side UNION processing, and jOOQ applies the result-fetching row type from the first subquery. The article recommends applying client-side conversions consistently across subqueries or moving the conversion to the server when appropriate.

### Source excerpt

jOOQ 3.15 introduced the concept of an ad-hoc converter, a converter that is applied "ad-hoc" to a single query. It uses the same underlying mechanisms as any ordinary Converter that is attached to generated code for use in every query. An example of such an ad-hoc converter is this: While there are other ways to ... Continue reading How to use jOOQ's Converters with UNION Operations ->

## How to Write a Derived Table in jOOQ

DevFeed: [How to Write a Derived Table in jOOQ](<https://devfeed.tech/articles/how-to-write-a-derived-table-in-jooq-28948.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-write-a-derived-table-in-jooq/>)

Author: lukaseder

Published: 2023-02-24T09:18:48Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Java](<https://devfeed.tech/topics/java.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [cte](<https://devfeed.tech/tags/cte.md>), [derived-table](<https://devfeed.tech/tags/derived-table.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [sql](<https://devfeed.tech/tags/sql.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>)

### AI overview

This tutorial explains how to write derived tables and common table expressions in jOOQ. It notes that derived-table columns are not fully type-safe in Java, and shows that simplifying an SQL query can sometimes eliminate the derived table and allow greater use of generated code.

### Source excerpt

One of the more frequent questions about jOOQ is how to write a derived table (or a CTE). The jOOQ manual shows a simple example of a derived table: In SQL: In jOOQ: And that's pretty much it. The question usually arises from the fact that there's a surprising lack of type safety when working ... Continue reading How to Write a Derived Table in jOOQ ->

## Why You Should Execute jOOQ Queries With jOOQ

DevFeed: [Why You Should Execute jOOQ Queries With jOOQ](<https://devfeed.tech/articles/why-you-should-execute-jooq-queries-with-jooq-28974.md>)

Original publisher: [Read original article](<https://blog.jooq.org/why-you-should-execute-jooq-queries-with-jooq/>)

Author: lukaseder

Published: 2023-01-18T11:46:25Z

Content type: opinion

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Java](<https://devfeed.tech/topics/java.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [code-generation](<https://devfeed.tech/tags/code-generation.md>), [crud](<https://devfeed.tech/tags/crud.md>), [csv](<https://devfeed.tech/tags/csv.md>), [execution](<https://devfeed.tech/tags/execution.md>), [export](<https://devfeed.tech/tags/export.md>), [identity](<https://devfeed.tech/tags/identity.md>), [import](<https://devfeed.tech/tags/import.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [json](<https://devfeed.tech/tags/json.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [multiset](<https://devfeed.tech/tags/multiset.md>), [nested-collections](<https://devfeed.tech/tags/nested-collections.md>), [nested-records](<https://devfeed.tech/tags/nested-records.md>), [orm](<https://devfeed.tech/tags/orm.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [sql](<https://devfeed.tech/tags/sql.md>), [stored-procedures](<https://devfeed.tech/tags/stored-procedures.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>), [udt](<https://devfeed.tech/tags/udt.md>), [updatablerecord](<https://devfeed.tech/tags/updatablerecord.md>), [user-defined-types](<https://devfeed.tech/tags/user-defined-types.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

The article argues that queries built with jOOQ should generally also be executed with jOOQ. It explains that jOOQ preserves type safety and structured result mapping during execution, whereas extracting SQL and bind values for JDBC-level execution loses compiler knowledge of the result set. It acknowledges limited use cases for executing jOOQ-generated SQL elsewhere, such as a small number of dynamic queries in an otherwise JPA-based application.

### Source excerpt

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 ... Continue reading Why You Should Execute jOOQ Queries With jOOQ ->

## jOOQ's R2DBC LoggingConnection to log all SQL statements

DevFeed: [jOOQ's R2DBC LoggingConnection to log all SQL statements](<https://devfeed.tech/articles/jooq-s-r2dbc-loggingconnection-to-log-all-sql-statements-28954.md>)

Original publisher: [Read original article](<https://blog.jooq.org/jooqs-r2dbc-loggingconnection-to-log-all-sql-statements/>)

Author: lukaseder

Published: 2023-01-17T10:12:05Z

Content type: article

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jdbctemplate](<https://devfeed.tech/tags/jdbctemplate.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [logging](<https://devfeed.tech/tags/logging.md>), [native](<https://devfeed.tech/tags/native.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

The article introduces jOOQ's LoggingConnection for R2DBC clients, which logs reactive SQL queries. It notes that the utility is available in jOOQ versions 3.18.0, 3.17.7, and 3.16.13, and that standalone code is available on GitHub.

### Source excerpt

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 ... Continue reading jOOQ's R2DBC LoggingConnection to log all SQL statements ->

## When to Use jOOQ and When to Use Native SQL

DevFeed: [When to Use jOOQ and When to Use Native SQL](<https://devfeed.tech/articles/when-to-use-jooq-and-when-to-use-native-sql-28972.md>)

Original publisher: [Read original article](<https://blog.jooq.org/when-to-use-jooq-and-when-to-use-native-sql/>)

Author: lukaseder

Published: 2022-12-08T13:53:02Z

Content type: comparison

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Testcontainers](<https://devfeed.tech/topics/testcontainers.md>)

Tags: [cons](<https://devfeed.tech/tags/cons.md>), [examples](<https://devfeed.tech/tags/examples.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jdbctemplate](<https://devfeed.tech/tags/jdbctemplate.md>), [jdbi](<https://devfeed.tech/tags/jdbi.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [native-sql](<https://devfeed.tech/tags/native-sql.md>), [plain-jdbc](<https://devfeed.tech/tags/plain-jdbc.md>), [plain-sql-templating](<https://devfeed.tech/tags/plain-sql-templating.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-json](<https://devfeed.tech/tags/sql-json.md>), [stored-procedures](<https://devfeed.tech/tags/stored-procedures.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testcontainers](<https://devfeed.tech/tags/testcontainers.md>)

### AI overview

This comparison explains when to use the jOOQ API and when to use native SQL for complex queries. It describes jOOQ's advantages for dynamic SQL, multiple database dialects, type safety, data mapping, stored procedures, security, exports, and diagnostics, while noting usability drawbacks for large static queries with many CTEs or derived tables.

### Source excerpt

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 ... Continue reading When to Use jOOQ and When to Use Native SQL ->

## Calling Procedures with Default Parameters using JDBC or jOOQ

DevFeed: [Calling Procedures with Default Parameters using JDBC or jOOQ](<https://devfeed.tech/articles/calling-procedures-with-default-parameters-using-jdbc-or-jooq-28932.md>)

Original publisher: [Read original article](<https://blog.jooq.org/calling-procedures-with-default-parameters-using-jdbc-or-jooq/>)

Author: lukaseder

Published: 2022-10-21T14:35:39Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Reason](<https://devfeed.tech/topics/reason.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Oracle Database](<https://devfeed.tech/topics/oracle-database.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [db2](<https://devfeed.tech/tags/db2.md>), [default-parameters](<https://devfeed.tech/tags/default-parameters.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [pl-pgsql](<https://devfeed.tech/tags/pl-pgsql.md>), [pl-sql](<https://devfeed.tech/tags/pl-sql.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [stored-functions](<https://devfeed.tech/tags/stored-functions.md>), [stored-procedures](<https://devfeed.tech/tags/stored-procedures.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

This tutorial explains how to call stored procedures with default parameters using JDBC or jOOQ. It shows how directly instantiating a procedure call allows Java code to omit parameters that have database-side defaults, and notes that syntax varies across supported relational database systems.

### Source excerpt

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 ... Continue reading Calling Procedures with Default Parameters using JDBC or jOOQ ->

## Using jOOQ's Implicit Join From Within the JOIN .. ON Clause

DevFeed: [Using jOOQ's Implicit Join From Within the JOIN .. ON Clause](<https://devfeed.tech/articles/using-jooq-s-implicit-join-from-within-the-join-on-clause-28970.md>)

Original publisher: [Read original article](<https://blog.jooq.org/using-jooqs-implicit-join-from-within-the-join-on-clause/>)

Author: lukaseder

Published: 2022-09-13T07:29:59Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [dictionary-views](<https://devfeed.tech/tags/dictionary-views.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implicit-join](<https://devfeed.tech/tags/implicit-join.md>), [information-schema](<https://devfeed.tech/tags/information-schema.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-17](<https://devfeed.tech/tags/jooq-3-17.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [pg-catalog](<https://devfeed.tech/tags/pg-catalog.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

This tutorial explains how to use jOOQ's type-safe implicit JOINs from within an explicit JOIN ... ON clause. It uses PostgreSQL dictionary views and related tables as an example, and describes how jOOQ generates SQL while preserving operator precedence.

### Source excerpt

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 ... Continue reading Using jOOQ's Implicit Join From Within the JOIN .. ON Clause ->

## A Brief Overview over the Most Common jOOQ Types

DevFeed: [A Brief Overview over the Most Common jOOQ Types](<https://devfeed.tech/articles/a-brief-overview-over-the-most-common-jooq-types-28928.md>)

Original publisher: [Read original article](<https://blog.jooq.org/a-brief-overview-over-the-most-common-jooq-types/>)

Author: lukaseder

Published: 2022-09-06T12:30:37Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [API](<https://devfeed.tech/topics/api.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-design](<https://devfeed.tech/tags/api-design.md>), [cheat-sheet](<https://devfeed.tech/tags/cheat-sheet.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [context](<https://devfeed.tech/tags/context.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-17](<https://devfeed.tech/tags/jooq-3-17.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [logging](<https://devfeed.tech/tags/logging.md>), [overview](<https://devfeed.tech/tags/overview.md>), [queryparts](<https://devfeed.tech/tags/queryparts.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [sql](<https://devfeed.tech/tags/sql.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [type-system](<https://devfeed.tech/tags/type-system.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

This tutorial provides a cheat sheet of the most important types in the jOOQ API, covering configuration, scopes, settings, and DSL APIs. It notes that jOOQ 3.17 includes more than 160 settings and explains how several type groups support query construction, execution, lifecycle management, and dependency injection.

### Source excerpt

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. ... Continue reading A Brief Overview over the Most Common jOOQ Types ->

## The Second Best Way to Fetch a Spring Data JPA DTO Projection

DevFeed: [The Second Best Way to Fetch a Spring Data JPA DTO Projection](<https://devfeed.tech/articles/the-second-best-way-to-fetch-a-spring-data-jpa-dto-projection-28966.md>)

Original publisher: [Read original article](<https://blog.jooq.org/the-second-best-way-to-fetch-a-spring-data-jpa-dto-projection/>)

Author: lukaseder

Published: 2022-08-30T14:48:44Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [dto-projection](<https://devfeed.tech/tags/dto-projection.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [nested-collections](<https://devfeed.tech/tags/nested-collections.md>), [repositories](<https://devfeed.tech/tags/repositories.md>), [spring-boot](<https://devfeed.tech/tags/spring-boot.md>), [spring-data-jpa](<https://devfeed.tech/tags/spring-data-jpa.md>)

### AI overview

The article presents jOOQ as a second way to implement a Spring Data JPA DTO projection. It shows value-constructor and aggregate-function approaches, emphasizing type-safe record conversion and reduced infrastructure code.

### Source excerpt

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 ... Continue reading The Second Best Way to Fetch a Spring Data JPA DTO Projection ->

## Cannot resolve symbol 'VERSION\_3\_17' in jOOQ generated code

DevFeed: [Cannot resolve symbol 'VERSION\_3\_17' in jOOQ generated code](<https://devfeed.tech/articles/cannot-resolve-symbol-version-3-17-in-jooq-generated-code-28933.md>)

Original publisher: [Read original article](<https://blog.jooq.org/cannot-resolve-symbol-version_3_17-in-jooq-generated-code/>)

Author: lukaseder

Published: 2022-08-30T06:56:20Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Maven](<https://devfeed.tech/topics/maven.md>)

Tags: [code-generation](<https://devfeed.tech/tags/code-generation.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compilation-error](<https://devfeed.tech/tags/compilation-error.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [errors](<https://devfeed.tech/tags/errors.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [location](<https://devfeed.tech/tags/location.md>), [maven](<https://devfeed.tech/tags/maven.md>)

### AI overview

This article explains that a VERSION_3_17 compilation error in jOOQ-generated code is caused by a mismatch between the runtime library and code generation library. The runtime version must be at least as new as the code generation version; matching both versions is recommended.

### Source excerpt

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. ... Continue reading Cannot resolve symbol 'VERSION_3_17' in jOOQ generated code ->

## A Condition is a Field

DevFeed: [A Condition is a Field](<https://devfeed.tech/articles/a-condition-is-a-field-28929.md>)

Original publisher: [Read original article](<https://blog.jooq.org/a-condition-is-a-field/>)

Author: lukaseder

Published: 2022-08-24T09:09:11Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [boolean](<https://devfeed.tech/tags/boolean.md>), [boolean-type](<https://devfeed.tech/tags/boolean-type.md>), [condition](<https://devfeed.tech/tags/condition.md>), [data-type](<https://devfeed.tech/tags/data-type.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-17](<https://devfeed.tech/tags/jooq-3-17.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [logic](<https://devfeed.tech/tags/logic.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [sql](<https://devfeed.tech/tags/sql.md>), [three-valued-logic](<https://devfeed.tech/tags/three-valued-logic.md>)

### AI overview

The article explains that, starting with jOOQ 3.17, the Condition type extends Field<Boolean>, allowing conditions to be projected directly and used wherever boolean value expressions are accepted. It describes compatibility differences between PostgreSQL and Oracle and jOOQ's emulation of the feature while preserving three-valued logic.

### Source excerpt

Starting with jOOQ 3.17, the Condition type extends the Field<Boolean> type. Because, that's what the SQL standard thinks it is, in sorts: The exact definition contains intermediate rules, but you get the idea. A <predicate> (which is a Condition in jOOQ) can be used wherever a <boolean value expression> can be used, which again can ... Continue reading A Condition is a Field ->

## How to Integration Test Stored Procedures with jOOQ

DevFeed: [How to Integration Test Stored Procedures with jOOQ](<https://devfeed.tech/articles/how-to-integration-test-stored-procedures-with-jooq-28942.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-integration-test-stored-procedures-with-jooq/>)

Author: lukaseder

Published: 2022-08-22T12:36:00Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Database](<https://devfeed.tech/topics/database.md>), [Testcontainers](<https://devfeed.tech/topics/testcontainers.md>), [Java](<https://devfeed.tech/topics/java.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [database](<https://devfeed.tech/tags/database.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [integration-test](<https://devfeed.tech/tags/integration-test.md>), [integration-testing](<https://devfeed.tech/tags/integration-testing.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [junit](<https://devfeed.tech/tags/junit.md>), [maven](<https://devfeed.tech/tags/maven.md>), [stored-procedures](<https://devfeed.tech/tags/stored-procedures.md>), [testcontainers](<https://devfeed.tech/tags/testcontainers.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>)

### AI overview

This tutorial explains how to integration-test database stored procedures and functions with Java, jOOQ, Testcontainers, and JUnit. It shows how to run PostgreSQL in Testcontainers, generate jOOQ classes for stored procedures, and reuse Java test infrastructure instead of manually binding to procedures through JDBC.

### Source excerpt

When you write stored procedures and functions in your database, you want to ensure their correctness, just like with your Java code. In Java, this is done with unit tests, typically with JUnit. For example, if you have the following code in Java: Then, you might write a test like this: But how do we ... Continue reading How to Integration Test Stored Procedures with jOOQ ->

## Using H2 as a Test Database Product with jOOQ

DevFeed: [Using H2 as a Test Database Product with jOOQ](<https://devfeed.tech/articles/using-h2-as-a-test-database-product-with-jooq-28969.md>)

Original publisher: [Read original article](<https://blog.jooq.org/using-h2-as-a-test-database-product/>)

Author: lukaseder

Published: 2022-08-19T07:25:43Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [in-memory database](<https://devfeed.tech/topics/in-memory-database.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [sql-server](<https://devfeed.tech/topics/sql-server.md>)

Tags: [compatibility-mode](<https://devfeed.tech/tags/compatibility-mode.md>), [database](<https://devfeed.tech/tags/database.md>), [h2](<https://devfeed.tech/tags/h2.md>), [in-memory-database](<https://devfeed.tech/tags/in-memory-database.md>), [integration-testing](<https://devfeed.tech/tags/integration-testing.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [testcontainers](<https://devfeed.tech/tags/testcontainers.md>), [testing](<https://devfeed.tech/tags/testing.md>), [vendor-agnosticity](<https://devfeed.tech/tags/vendor-agnosticity.md>)

### AI overview

This article explains the trade-offs of using H2 as a test database for Java applications with jOOQ. It shows why SQL that works on H2 may require syntax changes on SQL Server, describes H2 compatibility modes, and notes that jOOQ generates SQL for H2's native dialect rather than its compatibility modes.

### Source excerpt

The H2 database is an immensely popular in-memory database product mostly used by Java developers for testing. If you check out the DB-Engines ranking, it ranks 50th, which is quite impressive, as this rank outperforms products like: CockroachDB Ignite Single Store (previously MemSQL) Interbase (which was forked as Firebird) Ingres (which is a predecessor to ... Continue reading Using H2 as a Test Database Product with jOOQ ->

## The Best Way to Call Stored Procedures from Java: With jOOQ

DevFeed: [The Best Way to Call Stored Procedures from Java: With jOOQ](<https://devfeed.tech/articles/the-best-way-to-call-stored-procedures-from-java-with-jooq-28961.md>)

Original publisher: [Read original article](<https://blog.jooq.org/the-best-way-to-call-stored-procedures-from-java-with-jooq/>)

Author: lukaseder

Published: 2022-07-28T13:11:59Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Code generation](<https://devfeed.tech/topics/code-generation.md>), [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [data-processing](<https://devfeed.tech/topics/data-processing.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [code-generation](<https://devfeed.tech/tags/code-generation.md>), [code-generator](<https://devfeed.tech/tags/code-generator.md>), [data-processing](<https://devfeed.tech/tags/data-processing.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jdbc-drivers](<https://devfeed.tech/tags/jdbc-drivers.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [pl-pgsql](<https://devfeed.tech/tags/pl-pgsql.md>), [pl-sql](<https://devfeed.tech/tags/pl-sql.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [schema](<https://devfeed.tech/tags/schema.md>), [sql](<https://devfeed.tech/tags/sql.md>), [stored-functions](<https://devfeed.tech/tags/stored-functions.md>), [stored-procedures](<https://devfeed.tech/tags/stored-procedures.md>), [t-sql](<https://devfeed.tech/tags/t-sql.md>), [udts](<https://devfeed.tech/tags/udts.md>)

### AI overview

This tutorial explains how to call stored procedures from Java using jOOQ-generated code. It contrasts JDBC calls with generated procedure stubs and convenience methods, covering parameter handling, database types, and support for procedures, functions, packages, and UDTs.

### Source excerpt

jOOQ is mainly known for its powerful type safe, embedded, dynamic SQL capabilities that are made available through code generation. However, a secondary use case of code generation is to use it for stored procedures (possibly exclusively for stored procedures). Stored procedures are powerful ways of moving complex data processing logic to the server. This ... Continue reading The Best Way to Call Stored Procedures from Java: With jOOQ ->

## The Many Different Ways to Fetch Data in jOOQ

DevFeed: [The Many Different Ways to Fetch Data in jOOQ](<https://devfeed.tech/articles/the-many-different-ways-to-fetch-data-in-jooq-28962.md>)

Original publisher: [Read original article](<https://blog.jooq.org/the-many-different-ways-to-fetch-data-in-jooq/>)

Author: lukaseder

Published: 2022-05-19T07:29:09Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [jooq](<https://devfeed.tech/topics/jooq.md>), [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [collector](<https://devfeed.tech/tags/collector.md>), [convenience](<https://devfeed.tech/tags/convenience.md>), [fetching](<https://devfeed.tech/tags/fetching.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [joo-f6a0c60d3d07](<https://devfeed.tech/tags/joo-f6a0c60d3d07.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [optional](<https://devfeed.tech/tags/optional.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [reactive-streams](<https://devfeed.tech/tags/reactive-streams.md>), [sql](<https://devfeed.tech/tags/sql.md>), [stream-api](<https://devfeed.tech/tags/stream-api.md>), [streams](<https://devfeed.tech/tags/streams.md>)

### AI overview

This tutorial explains several ways to fetch data with jOOQ, including eager result-set fetching, external and internal iteration, single-record retrieval, optional results, and resource-managed fetching for large data sets.

### Source excerpt

The jOOQ API is all about convenience, and as such, an important operation (the most important one?) like fetch() must come with convenience, too. The default way to fetch data is this: It fetches the entire result set into memory and closes the underlying JDBC resources eagerly. But what other options do we have? Iterable ... Continue reading The Many Different Ways to Fetch Data in jOOQ ->

## How to Typesafely Map a Nested SQL Collection into a Nested Java Map with jOOQ

DevFeed: [How to Typesafely Map a Nested SQL Collection into a Nested Java Map with jOOQ](<https://devfeed.tech/articles/how-to-typesafely-map-a-nested-sql-collection-into-a-nested-java-map-with-jooq-28946.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-typesafely-map-a-nested-sql-collection-into-a-nested-java-map-with-jooq/>)

Author: lukaseder

Published: 2022-05-09T10:06:51Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [data](<https://devfeed.tech/topics/data.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [data](<https://devfeed.tech/tags/data.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [map](<https://devfeed.tech/tags/map.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [multiset](<https://devfeed.tech/tags/multiset.md>), [nested-collections](<https://devfeed.tech/tags/nested-collections.md>), [nested-maps](<https://devfeed.tech/tags/nested-maps.md>), [nested-records](<https://devfeed.tech/tags/nested-records.md>), [sql](<https://devfeed.tech/tags/sql.md>), [stack-overflow](<https://devfeed.tech/tags/stack-overflow.md>), [typesafety](<https://devfeed.tech/tags/typesafety.md>)

### AI overview

This tutorial shows how to use jOOQ 3.15's ad-hoc conversion API and nested collection features to map a nested SQL collection into a type-safe nested Java Map. It uses the Sakila database example and explains how collectors preserve insertion order.

### Source excerpt

A really cool, recent question on Stack Overflow was about how to map a nested collection into a Java Map with jOOQ. In the past, I've blogged about the powerful MULTISET operator many times, which allows for nesting collections in jOOQ. This time, instead of nesting data into a List<UserType>, why not nest it in ... Continue reading How to Typesafely Map a Nested SQL Collection into a Nested Java Map with jOOQ ->