jOOQ is a type-safe SQL query builder for Java that generates code from live database schemas, enabling compile-time validation of SQL syntax and data types. Its core identity is built around a fluent DSL that mirrors SQL structure, a code generator that maps tables, views, and routines to Java objects, and a multi-dialect engine that translates the same DSL into vendor-specific SQL for over 30 databases. The project also includes a SQL parser and transformer for refactoring or dialect conversion, reactive stream integration for non-blocking query execution, and a JDBC proxy diagnostics tool for detecting inefficient SQL patterns.
What distinguishes jOOQ is its combination of schema-driven code generation with a rich set of capabilities that go beyond basic query building. The project supports implicit join path navigation through foreign key relationships, active record CRUD operations on generated records, and dynamic SQL composition for runtime query assembly. It provides comprehensive diagnostics through JDBC connection proxying, detecting duplicate statements, unnecessary column projections, and inefficient row fetching. For security, jOOQ offers multi-tenant schema configuration and row-level security policy enforcement that automatically transforms DML statements. Testing is supported through mock database connections with configurable data providers for unit testing without a real database.
The broader capability surface includes data export in multiple formats (CSV, JSON, XML, HTML, plain text, and charts), nested collection fetching with the MULTISET operator, schema version diffing for migration DDL generation, and type-safe stored procedure integration. The project also supports custom data type mapping, composite type embedding, and runtime schema name mapping for environment portability. Documentation and installation are available through the project's website and Maven Central.