# jooq/jooq

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jooq-jooq).**

6,666 stars · 1,225 forks · Java · other

## Links

- GitHub: https://github.com/jOOQ/jOOQ
- Homepage: https://www.jooq.org
- awesome-repositories: https://awesome-repositories.com/repository/jooq-jooq.md

## Topics

`code-generator` `database` `db2` `hibernate` `java` `jdbc` `jdbc-utilities` `jooq` `jpa` `mysql` `oracle` `orm` `postgresql` `sql` `sql-builder` `sql-formatter` `sql-query` `sql-query-builder` `sql-query-formatter` `sqlserver`

## Description

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.

## Tags

### Software Engineering & Architecture

- [Schema-to-Code Generators](https://awesome-repositories.com/f/software-engineering-architecture/schema-to-code-generators.md) — Generates type-safe Java classes from live database schemas, mapping tables, views, and routines to compile-time objects.
- [Active Record Patterns](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/design-patterns/active-record-patterns.md) — Provides generated active records that directly map database rows to Java objects for CRUD operations.
- [SQL Anti-pattern Analyzers](https://awesome-repositories.com/f/software-engineering-architecture/anti-patterns/sql-anti-pattern-analyzers.md) — Detects problems like fetching too many rows, duplicate statements, or unused columns by proxying JDBC connections and analyzing SQL patterns. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/diagnostics/))
- [R2DBC Query Executors](https://awesome-repositories.com/f/software-engineering-architecture/high-performance-engineering/reactive-execution-engines/r2dbc-query-executors.md) — Executes queries as a Publisher for non-blocking consumption in reactive stream pipelines.
- [JDBC Diagnostics Proxies](https://awesome-repositories.com/f/software-engineering-architecture/method-interception-proxies/jdbc-diagnostics-proxies.md) — Provides a JDBC proxy that detects inefficient SQL patterns like duplicate statements and unnecessary columns.
- [Reactive Data Streams](https://awesome-repositories.com/f/software-engineering-architecture/reactive-data-streams.md) — Executes queries as a Publisher for non-blocking consumption in reactive stream pipelines.

### Part of an Awesome List

- [SQL Query Builders](https://awesome-repositories.com/f/awesome-lists/data/sql-query-builders.md) — Assembles SQL statements programmatically from independent expression objects to compose queries at runtime. ([source](https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql/))
- [SQL Parsers](https://awesome-repositories.com/f/awesome-lists/devtools/sql-parsers.md) — Translates SQL dialects and performs expression tree transformations.

### Data & Databases

- [CRUD Operations](https://awesome-repositories.com/f/data-databases/crud-operations.md) — Maps database rows to generated active records for direct create, read, update, and delete operations. ([source](https://www.jooq.org))
- [Updatable Records](https://awesome-repositories.com/f/data-databases/crud-operations/updatable-records.md) — Provides UpdatableRecord objects that automatically generate UPDATE statements when modified and stored back to the database. ([source](https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/))
- [Dynamic SQL Generators](https://awesome-repositories.com/f/data-databases/dynamic-sql-generators.md) — Assembles SQL statements programmatically from independent expression objects to compose queries at runtime with type safety.
- [SQL Syntax Tree Construction](https://awesome-repositories.com/f/data-databases/expression-based-data-querying/fluent-query-apis/sql-syntax-tree-construction.md) — Constructs SQL statements using a Java DSL that mirrors SQL syntax and enforces correct query structure at compile time. ([source](https://www.jooq.org/doc/latest/manual/sql-building/sql-statements/))
- [SQL Dialect Adapters](https://awesome-repositories.com/f/data-databases/sql-dialect-adapters.md) — Translates the same DSL into vendor-specific SQL for over 30 database dialects automatically.
- [Type-Safe](https://awesome-repositories.com/f/data-databases/sql-generators/type-safe.md) — Validates SQL syntax and data types at compile time through a fluent Java API that mirrors SQL structure.
- [Type-Safe Client Generators](https://awesome-repositories.com/f/data-databases/type-safe-client-generators.md) — Generates type-safe Java classes from live database schemas, mapping tables, views, and routines to compile-time objects.
- [Stored Procedure Method Generations](https://awesome-repositories.com/f/data-databases/type-safe-client-generators/stored-procedure-method-generations.md) — Call database functions and procedures with full type safety, including support for packages and procedural logic. ([source](https://www.jooq.org/download/))
- [DDL and DML Executions](https://awesome-repositories.com/f/data-databases/type-safe-data-abstractions/ddl-and-dml-executions.md) — Runs DDL and DML statements through a type-safe API that validates schema operations at compile time. ([source](https://cdn.jsdelivr.net/gh/jooq/jooq@main/README.md))
- [DDL Executions](https://awesome-repositories.com/f/data-databases/type-safe-data-abstractions/ddl-executions.md) — Executes CREATE, ALTER, and DROP operations through a type-safe API abstracting dialect differences. ([source](https://www.jooq.org/doc/latest/manual/sql-building/ddl-statements/))
- [Type-Safe Query Builders](https://awesome-repositories.com/f/data-databases/type-safe-query-builders.md) — Construct SQL queries with a fluent Java API that validates syntax and data types at compile time to prevent runtime errors. ([source](https://cdn.jsdelivr.net/gh/jooq/jooq@main/README.md))
- [Custom Type Converters](https://awesome-repositories.com/f/data-databases/custom-type-converters.md) — Attaches user-defined converters to generated column fields for automatic transformation between database and domain types. ([source](https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/))
- [Expression-Level Type Converters](https://awesome-repositories.com/f/data-databases/custom-type-converters/expression-level-type-converters.md) — Attaches custom data type converters to individual column expressions or plain SQL templates for type-safe querying. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/fetching/data-type-conversion/))
- [DTO Mappings](https://awesome-repositories.com/f/data-databases/data-serialization-formats/structured-data-exporters/analysis-result-exporters/query-result-exporters/dto-mappings.md) — Maps database records to plain Java objects using constructor references and ad-hoc conversions. ([source](https://cdn.jsdelivr.net/gh/jooq/jooq@main/README.md))
- [Database Type Mappings](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/schema-management-tools/database-type-mappings.md) — Maps between built-in database types and custom Java types using two-way converters for domain types in SQL expressions. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/fetching/data-type-conversion/))
- [Implicit Join Resolvers](https://awesome-repositories.com/f/data-databases/database-query-joins/implicit-join-resolvers.md) — Automatically generates JOIN clauses from foreign key relationships in generated table classes. ([source](https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/))
- [Dot-Notation Join Paths](https://awesome-repositories.com/f/data-databases/entity-relationships/implicit-relationships/dot-notation-join-paths.md) — Ships implicit join resolution via dot-notation path expressions on generated table classes.
- [Placeholder-Based SQL Templates](https://awesome-repositories.com/f/data-databases/expression-based-data-querying/fluent-query-apis/sql-syntax-tree-construction/placeholder-based-sql-templates.md) — Constructs SQL fragments by embedding numbered placeholders replaced with type-safe query parts at runtime. ([source](https://www.jooq.org/doc/latest/manual/sql-building/plain-sql-templating/))
- [MULTISET Nested Collection Fetching](https://awesome-repositories.com/f/data-databases/nested-collection-expansion/multiset-nested-collection-fetching.md) — Uses the MULTISET operator to retrieve hierarchical data structures with nested lists in a single round trip. ([source](https://cdn.jsdelivr.net/gh/jooq/jooq@main/README.md))
- [Query Condition Builders](https://awesome-repositories.com/f/data-databases/query-condition-builders.md) — Combines optional conditions at runtime with logical operators to filter query results based on application state. ([source](https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql/))
- [R2DBC Streams](https://awesome-repositories.com/f/data-databases/reactive-data-queries/r2dbc-streams.md) — Runs queries non-blocking on R2DBC connections for reactive stream pipelines. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/fetching/reactive-fetching/))
- [R2DBC Query Executors](https://awesome-repositories.com/f/data-databases/reactive-databases/r2dbc-query-executors.md) — Executes queries as non-blocking Publishers on R2DBC connections for reactive stream pipelines.
- [Dialect Transformers](https://awesome-repositories.com/f/data-databases/sql-dialect-adapters/dialect-transformers.md) — Rewrites SQL constructs between dialects, converting vendor-specific syntax into standard equivalents. ([source](https://www.jooq.org/download/))
- [SQL Construct Emulations](https://awesome-repositories.com/f/data-databases/sql-dialect-adapters/sql-construct-emulations.md) — Automatically rewrites SQL constructs like INSERT..RETURNING for databases that lack native support, using generated metadata about keys and identities. ([source](https://blog.jooq.org/why-you-should-use-jooq-with-code-generation/))
- [Pre-Emulation Transformations](https://awesome-repositories.com/f/data-databases/sql-dialect-adapters/sql-construct-emulations/pre-emulation-transformations.md) — Provides pre-rendering query model transformations for dialect compatibility. ([source](https://www.jooq.org/doc/latest/manual/sql-building/queryparts/sql-transformation/transform-patterns/))
- [SQL Parsers](https://awesome-repositories.com/f/data-databases/sql-parsers.md) — Parses SQL strings into an editable model and applies pattern-based transformations for refactoring or dialect conversion.
- [IDE Auto-Completion Providers](https://awesome-repositories.com/f/data-databases/sql-query-editors/ide-auto-completion-providers.md) — Provides a BNF-based interface hierarchy that enables IDE auto-completion for valid SQL clauses and operators. ([source](https://www.jooq.org/doc/latest/manual/sql-building/dsl-api/))
- [SQL Query Object Models](https://awesome-repositories.com/f/data-databases/sql-query-object-models.md) — Parses SQL into an editable model and applies pattern-based transformations for refactoring or dialect conversion.
- [JDBC Proxy Diagnostics](https://awesome-repositories.com/f/data-databases/sql-query-optimizations/jdbc-proxy-diagnostics.md) — Detects inefficient SQL patterns like duplicate statements, unnecessary columns, and excessive row fetching through JDBC monitoring.
- [JDBC Proxy Profilers](https://awesome-repositories.com/f/data-databases/sql-query-profilers/jdbc-proxy-profilers.md) — Detects inefficient queries, duplicate statements, and unnecessary column projections by proxying JDBC connections.
- [SQL Statement Parsing](https://awesome-repositories.com/f/data-databases/sql-statement-parsing.md) — Parses SQL strings into a type-safe query object model for programmatic inspection and transformation. ([source](https://www.jooq.org/doc/latest/manual/sql-building/sql-parser/))
- [Transformations](https://awesome-repositories.com/f/data-databases/sql-statement-parsing/transformations.md) — Provides SQL parsing and transformation capabilities for refactoring and dialect conversion. ([source](https://cdn.jsdelivr.net/gh/jooq/jooq@main/README.md))
- [Embedded Calls](https://awesome-repositories.com/f/data-databases/stored-procedures/embedded-calls.md) — Embeds stored procedure calls directly inside type-safe query statements for seamless integration. ([source](https://www.jooq.org))
- [Scala Query DSLs](https://awesome-repositories.com/f/data-databases/type-safe-query-builders/scala-query-dsls.md) — Provides Scala-specific implicit conversions and traits for writing type-safe SQL queries without boilerplate. ([source](https://www.jooq.org/doc/latest/manual/sql-building/scala-sql-building/))
- [Foreign Key Path Navigators](https://awesome-repositories.com/f/data-databases/virtual-table-querying/external-table-querying/direct-path-querying/foreign-key-path-navigators.md) — Accesses parent table columns from child tables using dot-notation path expressions with automatic JOIN generation. ([source](https://www.jooq.org/doc/latest/manual/sql-building/sql-statements/select-statement/implicit-join/))

### Development Tools & Productivity

- [Schema-Driven Code Generators](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/code-generation/schema-driven-code-generators.md) — Produces type-safe Java classes from existing database schemas for compile-time checking of table and column references. ([source](https://www.jooq.org/download/))

### Testing & Quality Assurance

- [SQL Query Validators](https://awesome-repositories.com/f/testing-quality-assurance/validation-verification/input-validation/compile-time-validators/sql-query-validators.md) — Rejects malformed query chains like missing ON clauses or mismatched subselect degrees during compilation. ([source](https://www.jooq.org/doc/latest/manual/sql-building/dsl-api/))
- [Database Interaction Mocking](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/test-data-management/test-mock-management-tools/database-interaction-mocking.md) — Provides a mock JDBC connection with a custom data provider for unit testing without a real database. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/mocking-connection/))

### Programming Languages & Runtimes

- [SQL Query Extensions](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/kotlin-extensions/sql-query-extensions.md) — Provides Kotlin-specific extensions for writing type-safe SQL queries with idiomatic Kotlin syntax. ([source](https://www.jooq.org/doc/latest/manual/sql-building/kotlin-sql-building/))

### System Administration & Monitoring

- [JDBC Interaction Monitors](https://awesome-repositories.com/f/system-administration-monitoring/diagnostic-monitors/jdbc-interaction-monitors.md) — Intercepts JDBC calls through a proxy connection to collect diagnostics on API-level, JDBC-level, and SQL-level issues. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/diagnostics/))
- [JDBC Proxy Diagnostics](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/diagnostic-error-reporting/database-diagnostics/jdbc-proxy-diagnostics.md) — Wraps a real database connection with a diagnostics layer that inspects SQL and JDBC calls without requiring jOOQ API usage. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/diagnostics/))

### Web Development

- [DAO Persistence Generators](https://awesome-repositories.com/f/web-development/crud-generators/dao-persistence-generators.md) — Generates DAO classes that insert, update, delete, and retrieve POJOs for single-primary-key tables. ([source](https://www.jooq.org/doc/latest/manual/sql-execution/daos/))
- [Operator-Based Query DSLs](https://awesome-repositories.com/f/web-development/scala/operator-based-query-dsls.md) — Overloads standard Scala operators on field types so queries read like native Scala expressions. ([source](https://www.jooq.org/doc/latest/manual/sql-building/scala-sql-building/))
