Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10

This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.

QueryParts

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

A org.jooq.Query and all its contained objects is a org.jooq.QueryPart. QueryParts essentially provide this functionality:

Both of these methods are contained in jOOQ's internal API's org.jooq.QueryPartInternal, which is internally implemented by every QueryPart.

The following sections explain some more details about SQL rendering and variable binding, as well as other implementation details about QueryParts in general.

Table of contents

3.26.1.
SQL rendering
3.26.2.
Declaration vs reference
3.26.3.
Pretty printing SQL
3.26.4.
Variable binding
3.26.5.
Custom data type bindings
3.26.6.
Custom syntax elements
3.26.7.
Plain SQL QueryParts
3.26.8.
Serializability
3.26.9.
SQL transformation
3.26.9.1.
ANSI JOIN to table lists
3.26.9.2.
Table lists to ANSI JOIN
3.26.9.3.
ROWNUM to LIMIT
3.26.9.4.
QUALIFY to derived table
3.26.9.5.
IN condition subquery with LIMIT to derived table
3.26.9.6.
GROUP BY <column index>
3.26.9.7.
Inline CTE
3.26.9.8.
Unnecessary arithmetic expressions
3.26.9.9.
Pattern based transformation
3.26.9.9.1.
AND to NOT IN
3.26.9.9.2.
Arithmetic comparisons
3.26.9.9.3.
Arithmetic expressions
3.26.9.9.4.
BIT_GET function
3.26.9.9.5.
BIT_SET function
3.26.9.9.6.
CASE searched to CASE simple
3.26.9.9.7.
CASE to CASE abbreviation
3.26.9.9.8.
CASE with DISTINCT FROM to DECODE
3.26.9.9.9.
CASE with ELSE NULL
3.26.9.9.10.
COUNT(*) scalar subquery comparison
3.26.9.9.11.
COUNT(const)
3.26.9.9.12.
COUNT(expr) scalar subquery comparison
3.26.9.9.13.
DISTINCT FROM NULL
3.26.9.9.14.
Empty scalar subquery
3.26.9.9.15.
Flatten CASE
3.26.9.9.16.
Flatten CASE abbreviations
3.26.9.9.17.
Flatten DECODE
3.26.9.9.18.
Hyperbolic functions
3.26.9.9.19.
Idempotent function repetition
3.26.9.9.20.
Inverse hyperbolic functions
3.26.9.9.21.
Logarithmic functions
3.26.9.9.22.
Merge AND predicates
3.26.9.9.23.
Merge BIT_NOT with BIT_NAND
3.26.9.9.24.
Merge BIT_NOT with BIT_NOR
3.26.9.9.25.
Merge BIT_NOT with BIT_XNOR
3.26.9.9.26.
Merge CASE .. WHEN and ELSE clauses
3.26.9.9.27.
Merge CASE .. WHEN clauses
3.26.9.9.28.
Merge IN predicates
3.26.9.9.29.
Merge NOT with comparison predicates
3.26.9.9.30.
Merge NOT with DISTINCT predicate
3.26.9.9.31.
Merge OR predicates
3.26.9.9.32.
Merge range predicates
3.26.9.9.33.
Normalise associative operations
3.26.9.9.34.
Normalise fields compared to values
3.26.9.9.35.
Normalise IN list with single element to comparison
3.26.9.9.36.
NOT AND
3.26.9.9.37.
NOT OR
3.26.9.9.38.
NULL ON NULL INPUT
3.26.9.9.39.
OR to IN
3.26.9.9.40.
Repeated arithmetic negation
3.26.9.9.41.
Repeated bitwise negation
3.26.9.9.42.
Repeated NOT
3.26.9.9.43.
Simplify CASE abbreviations
3.26.9.9.44.
Trigonometric functions
3.26.9.9.45.
Trim
3.26.9.9.46.
Trivial bitwise operations
3.26.9.9.47.
Trivial CASE abbreviations
3.26.9.9.48.
Trivial predicates
3.26.9.9.49.
Unnecessary DISTINCT
3.26.9.9.50.
Unnecessary EXISTS subquery clauses
3.26.9.9.51.
Unnecessary GROUP BY expressions
3.26.9.9.52.
Unnecessary INNER JOIN
3.26.9.9.53.
Unnecessary ORDER BY expressions
3.26.9.9.54.
Unnecessary scalar subquery
3.26.9.9.55.
Unreachable CASE clauses
3.26.9.9.56.
Unreachable DECODE clauses
3.26.10.
Custom SQL transformation with VisitListener
3.26.10.1.
Example: Logging abbreviated bind values
3.26.11.
Policies
3.26.11.1.
Configuration
3.26.11.2.
Implementation
3.26.11.3.
Inheritance
3.26.11.4.
Security considerations

previous : next

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo