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

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

4.23.1.
SQL rendering
4.23.2.
Declaration vs reference
4.23.3.
Pretty printing SQL
4.23.4.
Variable binding
4.23.5.
Custom data type bindings
4.23.6.
Custom syntax elements
4.23.7.
Plain SQL QueryParts
4.23.8.
Serializability
4.23.9.
SQL transformation
4.23.9.1.
ANSI JOIN to table lists
4.23.9.2.
Table lists to ANSI JOIN
4.23.9.3.
ROWNUM to LIMIT
4.23.9.4.
QUALIFY to derived table
4.23.9.5.
IN condition subquery with LIMIT to derived table
4.23.9.6.
GROUP BY <column index> (new)
4.23.9.7.
Inline CTE (new)
4.23.9.8.
Unnecessary arithmetic expressions
4.23.9.9.
Pattern based transformation
4.23.9.9.1.
AND to NOT IN
4.23.9.9.2.
Arithmetic comparisons (new)
4.23.9.9.3.
Arithmetic expressions
4.23.9.9.4.
CASE searched to CASE simple (new)
4.23.9.9.5.
CASE to CASE abbreviation (new)
4.23.9.9.6.
CASE with DISTINCT FROM to DECODE (new)
4.23.9.9.7.
CASE with ELSE NULL (new)
4.23.9.9.8.
COUNT(*) scalar subquery comparison
4.23.9.9.9.
COUNT(const) (new)
4.23.9.9.10.
DISTINCT FROM NULL (new)
4.23.9.9.11.
Empty scalar subquery
4.23.9.9.12.
Flatten CASE (new)
4.23.9.9.13.
Flatten CASE abbreviations (new)
4.23.9.9.14.
Flatten DECODE (new)
4.23.9.9.15.
Hyperbolic functions
4.23.9.9.16.
Idempotent function repetition
4.23.9.9.17.
Inverse hyperbolic functions
4.23.9.9.18.
Logarithmic functions
4.23.9.9.19.
Merge AND predicates
4.23.9.9.20.
Merge BIT_NOT with BIT_NAND
4.23.9.9.21.
Merge BIT_NOT with BIT_NOR
4.23.9.9.22.
Merge BIT_NOT with BIT_XNOR
4.23.9.9.23.
Merge CASE .. WHEN and ELSE clauses (new)
4.23.9.9.24.
Merge CASE .. WHEN clauses (new)
4.23.9.9.25.
Merge IN predicates
4.23.9.9.26.
Merge NOT with comparison predicates
4.23.9.9.27.
Merge NOT with DISTINCT predicate
4.23.9.9.28.
Merge OR predicates
4.23.9.9.29.
Merge range predicates
4.23.9.9.30.
Normalise associative operations
4.23.9.9.31.
Normalise fields compared to values
4.23.9.9.32.
Normalise IN list with single element to comparison
4.23.9.9.33.
NOT AND (new)
4.23.9.9.34.
NOT OR (new)
4.23.9.9.35.
NULL ON NULL INPUT (new)
4.23.9.9.36.
OR to IN
4.23.9.9.37.
Repeated bitwise negation
4.23.9.9.38.
Repeated logical negation
4.23.9.9.39.
Repeated NOT
4.23.9.9.40.
Simplify CASE abbreviations (new)
4.23.9.9.41.
Trigonometric functions
4.23.9.9.42.
Trim
4.23.9.9.43.
Trivial bitwise operations (new)
4.23.9.9.44.
Trivial CASE abbreviations
4.23.9.9.45.
Trivial predicates
4.23.9.9.46.
Unnecessary DISTINCT (new)
4.23.9.9.47.
Unnecessary EXISTS subquery clauses (new)
4.23.9.9.48.
Unnecessary GROUP BY expressions (new)
4.23.9.9.49.
Unnecessary INNER JOIN (new)
4.23.9.9.50.
Unnecessary ORDER BY expressions (new)
4.23.9.9.51.
Unnecessary scalar subquery (new)
4.23.9.9.52.
Unreachable CASE clauses (new)
4.23.9.9.53.
Unreachable DECODE clauses (new)
4.23.10.
Custom SQL transformation
4.23.10.1.
Logging abbreviated bind values

previous : next

Feedback

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

The jOOQ Logo