jOOQ 3.19
Last reviewed Sep 23, 2026
Prompt Details
Prompt Composition
2prompts
- Java 17109 lines · 4.4K tokens
- jOOQ 3.1973 lines · 3.3K tokens
Total182 lines · 7.7K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 90
- 95
- 117
- 190
- 201
- 208
- 209
- 214
- 250
- 287
- 295
- 297
- 323
- 327
- 338
- 347
- 354
- 362
- 367
- 378
- 427
- 459
- 470
- 471
- 494
- 502
- 532
- 566
- 611
- 653
- 732
- 770
- 772
- 776
- 807
- 829
- 862
- 863
- 915
- 916
- 918
- 922
Prompt Preview
Apply the Java 17 prompt first. These rules cover jOOQ 3.19 on Java 17 or later with the org.jooq Open Source or org.jooq.pro commercial artifacts, and were checked against 3.19.37. The commercial Java 11 distribution and Enterprise Java 8 distribution require their corresponding runtime baselines. Apply commercial-only controls only when the deployed edition provides them.
Building statements safely
- Use generated fields and tables with value-accepting DSL overloads or
DSL.val(value)so external values enter the query as data. - Restrict the
@PlainSQLAPI surface, includingDSL.sql,DSL.condition(String),DSL.field(String),DSL.table(String), andDSLContext.fetch(String), to a small audited set of classes. - Activate
org.jooq.checker.PlainSQLCheckerin the compiler and keep@Allow.PlainSQLexceptions narrow; addingjooq-checkeras a dependency alone does not enforce the check. - Keep plain SQL templates constant. Use the
String, Object...overload with JDBC?markers for values, or theString, QueryPart...overload with{0}placeholders andDSL.val(value)arguments. AQueryPartcan contain SQL structure and is not automatically a safe value. - Keep placeholders outside string literals, quoted identifiers, and comments, where the template engine does not substitute them. Never concatenate external text into those regions.
- Keep
renderPlainSQLTemplatesAsRaw=false; reserveDSL.raw(String)for reviewed constant SQL that deliberately bypasses template processing. - Map requested identifiers, sort directions, and functions to