This API is EXPERIMENTAL. Use at your own risk.
Purpose
This class provides a single namespace for jOOQ's query object model API.
Every QueryPart
from the DSL API has a matching QueryPart
representation in this query object model API, and a shared internal
implementation in the org.jooq.impl
package, that covers both
the DSL and model API functionality.
The goal of this model API is to allow for expression tree transformations
via QueryPart#$replace(Function1)
as well as via per-querypart
methods, such as for example QOM.Substring.$startingPosition(Field)
, and
traversals via QueryPart.$traverse(Traverser)
that are independent of
the DSL API that would otherwise be too noisy for this task.
Design
In order to avoid conflicts between the model API and the DSL API, all model API in this class follows these naming conventions:
- All public model API types are nested in the
QOM
class, whereas DSL API types are top level types in theorg.jooq
package. - All accessor methods and their corresponding "immutable setters"
(returning a copy containing the modification) are named
$property()
, e.g.QOM.Substring.$startingPosition()
andQOM.Substring.$startingPosition(Field)
. - All private model API utility types are named
UXyz
, e.g.QOM.UEmpty
Limitations
The API offers public access to jOOQ's internal representation, and as such, is prone to incompatible changes between minor releases, in addition to the incompatible changes that may arise due to this API being experimental. In this experimental stage, the following limitations are accepted:
- Not all
QueryPart
implementations have a corresponding publicQueryPart
type yet, but may just implement the API via aQOM.UEmpty
orQOM.UNotYetImplemented
subtype, and may not provide access to contents via accessor methods. - Some child elements of a
QueryPart
may not yet be represented in the model API, such as for example theSELECT … FOR UPDATE
clause, as substantial changes to the internal model are still required before being able to offer public access to it.
Mutability
While some elements of this API are historically mutable (either mutable
objects are returned from QueryPart
subtypes, or argument objects
when constructing an QueryPart
remains mutable, rather than copied),
users must not rely on this mutable behaviour. Once this API stabilises, all
mutability will be gone, accidental remaining mutability will be considered a
bug.
Notes
A future Java 17 distribution of jOOQ might make use of sealed types to improve the usability of the model API in pattern matching expressions etc. Other Java language features that benefit pattern matching expression trees might be adopted in the future in this area of the jOOQ API.
- Author:
- Lukas Eder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
TheABS
function.static interface
TheACOS
function.static interface
TheADD
operator.static interface
TheALTER DATABASE
statement.static interface
TheALTER DOMAIN
statement.static interface
TheALTER INDEX
statement.static interface
TheALTER SCHEMA
statement.static interface
QOM.AlterSequence<T extends Number>
TheALTER SEQUENCE
statement.static interface
TheALTER TYPE
statement.static interface
TheALTER VIEW
statement.static interface
TheAND
operator.static interface
TheANY VALUE
function.static interface
static interface
static interface
TheARRAY GET
function.static interface
static interface
TheASCII
function.static interface
TheASIN
function.static interface
static interface
TheATAN
function.static interface
TheATAN2
function.static interface
TheAVG
function.static interface
static interface
QOM.BitAnd<T extends Number>
TheBIT AND
operator.static interface
QOM.BitAndAgg<T extends Number>
TheBIT AND AGG
function.static interface
TheBIT COUNT
function.static interface
TheBIT LENGTH
function.static interface
QOM.BitNand<T extends Number>
TheBIT NAND
operator.static interface
QOM.BitNor<T extends Number>
TheBIT NOR
operator.static interface
QOM.BitNot<T extends Number>
TheBIT NOT
operator.static interface
TheBIT OR
operator.static interface
QOM.BitOrAgg<T extends Number>
TheBIT OR AGG
function.static interface
QOM.BitXNor<T extends Number>
TheBIT X NOR
operator.static interface
QOM.BitXor<T extends Number>
TheBIT XOR
operator.static interface
QOM.BitXorAgg<T extends Number>
TheBIT XOR AGG
function.static interface
TheBOOL AND
function.static interface
TheBOOL OR
function.static interface
TheCALL
statement.static interface
TheCARDINALITY
function.static enum
TheCascade
type.static interface
static interface
TheCEIL
function.static interface
TheCHAR LENGTH
function.static interface
static interface
static interface
TheCHR
function.static interface
static interface
static interface
static interface
QOM.Collect<T,
A extends ArrayRecord<T>> static interface
static interface
TheCOMMENT ON TABLE
statement.static interface
static interface
static interface
TheFIELD
function.static interface
TheCONNECT BY ISCYCLE
function.static interface
TheCONNECT BY ISLEAF
function.static interface
TheCONNECT BY ROOT
function.static interface
TheCONTAINS
operator.static interface
TheCONTAINS IGNORE CASE
operator.static interface
static interface
static interface
TheCORR
function.static interface
TheCOS
function.static interface
TheCOSH
function.static interface
TheCOT
function.static interface
TheCOTH
function.static interface
TheCOUNT
function.static interface
static interface
TheCOVAR POP
function.static interface
TheCOVAR SAMP
function.static interface
TheCREATE DATABASE
statement.static interface
TheCREATE DOMAIN
statement.static interface
TheCREATE FUNCTION
statement.static interface
TheCREATE INDEX
statement.static interface
TheCREATE PROCEDURE
statement.static interface
TheCREATE SCHEMA
statement.static interface
TheCREATE SEQUENCE
statement.static interface
TheCREATE TRIGGER
statement.static interface
static interface
QOM.CreateView<R extends Record>
static interface
static interface
static interface
TheCURRENT CATALOG
function.static interface
static interface
TheCURRENT SCHEMA
function.static interface
static interface
static interface
TheCURRENT USER
function.static enum
TheCycleOption
type.static interface
QOM.DataChangeDeltaTable<R extends Record>
static interface
TheDATE ADD
function.static interface
static interface
static interface
TheDEGREES
function.static interface
TheDELETING
function.static interface
static interface
QOM.DerivedTable<R extends Record>
static enum
TheDeterministic
type.static interface
TheDIGITS
function.static interface
TheDIV
operator.static enum
TheDocumentOrContent
type.static interface
TheDROP DATABASE
statement.static interface
TheDROP DOMAIN
statement.static interface
TheDROP FUNCTION
statement.static interface
TheDROP INDEX
statement.static interface
TheDROP PROCEDURE
statement.static interface
TheDROP SCHEMA
statement.static interface
TheDROP SEQUENCE
statement.static interface
TheDROP TABLE
statement.static interface
TheDROP TRIGGER
statement.static interface
static interface
TheDROP VIEW
statement.static interface
static interface
TheENDS WITH
operator.static interface
TheENDS WITH IGNORE CASE
operator.static interface
TheEQ
operator.static interface
TheE
function.static interface
TheEXECUTE
function.static interface
TheEXISTS
function.static interface
static interface
TheEXP
function.static interface
static interface
static interface
TheCONDITION
function.static interface
static interface
static interface
TheFLOOR
function.static interface
static enum
TheFrameExclude
type.static enum
TheFrameUnits
type.static enum
TheFromFirstOrLast
type.static interface
static interface
TheGE
operator.static interface
static enum
TheGenerationOption
type.static interface
TheGOTO
function.static interface
TheGRANT
statement.static interface
static interface
static interface
TheGT
operator.static enum
TheIdentityRestartOption
type.static interface
static interface
static interface
TheIN
operator.static interface
static interface
static interface
TheINSERTING
function.static interface
TheIS DISTINCT FROM
operator.static interface
TheIS DOCUMENT
operator.static interface
TheIS JSON
operator.static interface
TheIS NOT DISTINCT FROM
operator.static interface
TheIS NOT DOCUMENT
operator.static interface
TheIS NOT JSON
operator.static interface
TheIS NOT NULL
operator.static interface
TheIS NULL
operator.static interface
TheJSON ARRAY
function.static interface
static interface
TheJSON OBJECT
function.static interface
static enum
TheJSONOnNull
type.static interface
static interface
static interface
static interface
static interface
QOM.Lateral<R extends Record>
static interface
TheLE
operator.static interface
static interface
static interface
TheLEFT
function.static interface
TheLEVEL
function.static interface
TheLIKE
operator.static interface
TheLIKE IGNORE CASE
operator.static interface
QOM.LinkedTable<R extends Record>
static interface
TheLN
function.static interface
TheLOG10
function.static interface
static interface
TheLOWER
function.static interface
TheLPAD
function.static interface
TheLT
operator.static interface
TheLTRIM
function.static enum
TheMaterialized
type.static interface
TheMAX
function.static interface
TheMD5
function.static interface
TheMEDIAN
function.static interface
TheMIN
function.static interface
TheMOD
operator.static interface
static interface
TheMUL
operator.static interface
QOM.Multiset<R extends Record>
static interface
QOM.MultisetAgg<R extends Record>
static interface
TheNE
operator.static interface
static interface
TheNOT
operator.static interface
TheNOT
operator.static interface
TheNOT IN
operator.static interface
static interface
TheNOT LIKE
operator.static interface
TheNOT LIKE IGNORE CASE
operator.static interface
TheNOT SIMILAR TO
operator.static class
Deprecated, for removal: This API element is subject to removal in a future version.- [#12425] - 3.16.0 - Missing implementations should be added as soon as possible!static interface
static interface
static enum
TheNullCallClause
type.static interface
TheNULLIF
function.static enum
TheNullOrdering
type.static interface
static enum
TheNullTreatment
type.static interface
TheNVL
function.static interface
static interface
TheOCTET LENGTH
function.static interface
TheOR
operator.static interface
TheOVERLAY
function.static interface
static interface
ThePI
function.static interface
ThePLUS
operator.static interface
ThePOSITION
function.static interface
ThePOWER
operator.static interface
static interface
ThePRIOR
function.static interface
ThePRODUCT
function.static interface
TheROWID
operator.static interface
TheRADIANS
function.static interface
TheRAND
function.static interface
static interface
static interface
static interface
TheREGR AVGX
function.static interface
TheREGR AVGY
function.static interface
TheREGR COUNT
function.static interface
TheREGR INTERCEPT
function.static interface
TheREGR R2
function.static interface
TheREGR SLOPE
function.static interface
TheREGR SXX
function.static interface
TheREGR SXY
function.static interface
TheREGR SYY
function.static interface
TheREPEAT
function.static interface
TheREPLACE
function.static enum
TheResultOption
type.static interface
TheRETURN_
function.static interface
TheREVERSE
function.static interface
TheREVOKE
statement.static interface
TheRIGHT
function.static interface
static interface
TheROUND
function.static interface
static interface
QOM.RowField<R extends Record>
static interface
static interface
static interface
TheROWNUM
function.static interface
static interface
static interface
static interface
TheRPAD
function.static interface
TheRTRIM
function.static interface
static interface
static interface
static interface
TheSET CATALOG
statement.static interface
TheSET
statement.static interface
TheSET SCHEMA
statement.static interface
TheSHL
operator.static interface
TheSHR
operator.static interface
TheSIGN
function.static interface
TheSIGNAL SQL STATE
function.static interface
TheSIMILAR TO
operator.static interface
TheSIN
function.static interface
TheSINH
function.static interface
TheSPACE
function.static interface
TheSPLIT PART
function.static enum
TheSQLDataAccess
type.static interface
TheSQRT
function.static interface
QOM.Square<T extends Number>
TheSQUARE
function.static interface
TheST AREA
function.static interface
TheSTARTS WITH
operator.static interface
TheSTARTS WITH IGNORE CASE
operator.static interface
TheST ASBINARY
function.static interface
TheST ASTEXT
function.static interface
TheST CENTROID
function.static interface
QOM.StContains<T extends Spatial>
TheST CONTAINS
function.static interface
TheST CROSSES
function.static interface
TheSTDDEV POP
function.static interface
TheSTDDEV SAMP
function.static interface
QOM.StDifference<T extends Spatial>
TheST DIFFERENCE
function.static interface
QOM.StDisjoint<T extends Spatial>
TheST DISJOINT
function.static interface
QOM.StDistance<T extends Spatial>
TheST DISTANCE
function.static interface
QOM.StEndPoint<T extends Spatial>
TheST ENDPOINT
function.static interface
QOM.StEquals<T extends Spatial>
TheST EQUALS
function.static interface
TheST EXTERIORRING
function.static interface
QOM.StGeometryN<T extends Spatial>
TheST GEOMETRYN
function.static interface
TheST GEOMETRYTYPE
function.static interface
TheST GEOMFROMTEXT
function.static interface
TheST GEOMFROMWKB
function.static interface
TheST INTERIORRINGN
function.static interface
QOM.StIntersection<T extends Spatial>
TheST INTERSECTION
function.static interface
QOM.StIntersects<T extends Spatial>
TheST INTERSECTS
function.static interface
TheST ISCLOSED
function.static interface
TheST ISEMPTY
function.static interface
TheST LENGTH
function.static interface
TheST NUMGEOMETRIES
function.static interface
TheST NUMINTERIORRING
function.static interface
TheST NUMPOINTS
function.static interface
QOM.StOverlaps<T extends Spatial>
TheST OVERLAPS
function.static interface
QOM.StPointN<T extends Spatial>
TheST POINTN
function.static interface
TheST SRID
function.static interface
QOM.StStartPoint<T extends Spatial>
TheST STARTPOINT
function.static interface
QOM.StTouches<T extends Spatial>
TheST TOUCHES
function.static interface
QOM.StUnion<T extends Spatial>
TheST UNION
function.static interface
QOM.StWithin<T extends Spatial>
TheST WITHIN
function.static interface
TheST X
function.static interface
TheST Y
function.static interface
TheST Z
function.static interface
TheSUB
operator.static interface
TheSUBSTRING
function.static interface
TheSUBSTRING INDEX
function.static interface
TheSUM
function.static interface
TheSYS CONNECT BY PATH
function.static interface
QOM.TableAlias<R extends Record>
static interface
QOM.TableEq<R extends Record>
TheEQ
operator.static interface
QOM.TableNe<R extends Record>
TheNE
operator.static interface
TheTAN
function.static interface
TheTANH
function.static interface
TheTAU
function.static interface
static interface
TheTO CHAR
function.static interface
TheTO DATE
function.static interface
TheTO HEX
function.static interface
TheTO TIMESTAMP
function.static interface
TheTRANSLATE
function.static interface
TheTRIM
function.static interface
TheTRUNC
function.static interface
QOM.Truncate<R extends Record>
TheTRUNCATE
statement.static interface
TheUNIQUE
function.static interface
static interface
QOM.UnmodifiableCollection<Q extends QueryPart>
An unmodifiableCollection
ofQueryPart
elements.static interface
QOM.UnmodifiableList<Q extends QueryPart>
static interface
TheUPDATING
function.static interface
TheUPPER
function.static interface
TheUUID
function.static interface
static interface
QOM.Values<R extends Record>
static interface
TheVAR POP
function.static interface
TheVAR SAMP
function.static interface
QOM.WidthBucket<T extends Number>
TheWIDTH BUCKET
function.static interface
static interface
static interface
static interface
TheXMLCOMMENT
function.static interface
TheXMLCONCAT
function.static interface
TheXMLDOCUMENT
function.static interface
static interface
static interface
TheXMLFOREST
function.static interface
static enum
TheXMLPassingMechanism
type.static interface
TheXMLPI
function.static interface
static interface
TheXMLSERIALIZE
function. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final <Q extends QueryPart>
QOM.UnmodifiableList<Q>unmodifiable
(Collection<Q> collection) Turn aCollection
into an unmodifiableQOM.UnmodifiableList
.static final <Q extends QueryPart>
QOM.UnmodifiableList<Q>unmodifiable
(List<Q> list) Turn aList
into an unmodifiableQOM.UnmodifiableList
.static final <Q extends QueryPart>
QOM.UnmodifiableList<Q>unmodifiable
(Q[] array) Turn an array into an unmodifiableQOM.UnmodifiableList
.
-
Constructor Details
-
QOM
public QOM()
-
-
Method Details
-
unmodifiable
Turn an array into an unmodifiableQOM.UnmodifiableList
. -
unmodifiable
@Internal public static final <Q extends QueryPart> QOM.UnmodifiableList<Q> unmodifiable(List<Q> list) Turn aList
into an unmodifiableQOM.UnmodifiableList
. -
unmodifiable
@Internal public static final <Q extends QueryPart> QOM.UnmodifiableList<Q> unmodifiable(Collection<Q> collection) Turn aCollection
into an unmodifiableQOM.UnmodifiableList
.
-