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
invalid @link
QueryPart#$replace(Function1)
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
TheACOSH
function.static interface
TheACOTH
function.static interface
TheADD
operator.static interface
QOM.Aliasable<Q extends QueryPart>
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 APPEND
function.static interface
TheARRAY CONCAT
function.static interface
TheARRAY GET
function.static interface
TheARRAY OVERLAP
function.static interface
TheARRAY PREPEND
function.static interface
static interface
TheARRAY REMOVE
function.static interface
TheARRAY REPLACE
function.static interface
TheASCII
function.static interface
TheASIN
function.static interface
TheASINH
function.static interface
static interface
TheATAN
function.static interface
TheATAN2
function.static interface
TheATANH
function.static interface
TheAVG
function.static interface
TheBETWEEN
predicate.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
QOM.BitGet<T extends Number>
TheBIT GET
function.static interface
TheBIT LENGTH
function.static interface
QOM.BitNand<T extends Number>
TheBIT NAND
operator.static interface
QOM.BitNandAgg<T extends Number>
TheBIT NAND AGG
function.static interface
QOM.BitNor<T extends Number>
TheBIT NOR
operator.static interface
QOM.BitNorAgg<T extends Number>
TheBIT NOR AGG
function.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.BitSet<T extends Number>
TheBIT SET
function.static interface
QOM.BitXNor<T extends Number>
TheBIT X NOR
operator.static interface
QOM.BitXNorAgg<T extends Number>
TheBIT X NOR AGG
function.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
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
QOM.CombinedCondition<R extends QOM.CombinedCondition<R>>
static interface
TheCOMMENT ON TABLE
statement.static interface
TheCOMMIT
statement.static interface
QOM.CompareCondition<T,
R extends QOM.CompareCondition<T, R>> 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 TABLE
statement.static interface
TheCREATE TRIGGER
statement.static interface
TheCREATE TYPE
statement.static interface
QOM.CreateView<R extends Record>
TheCREATE VIEW
statement.static interface
QOM.CrossApply<R extends Record>
static interface
QOM.CrossJoin<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
QOM.Decode<V,
T> static interface
static interface
TheDEGREES
function.static interface
QOM.Delete<R extends Record>
TheDELETE
statement.static interface
QOM.DeleteReturning<R extends Record>
AnDELETE
statement with aRETURNING
clause.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
TheDROP TYPE
statement.static interface
TheDROP VIEW
statement.static interface
static interface
static interface
TheENDS WITH
operator.static interface
TheENDS WITH IGNORE CASE
operator.static interface
TheEQ
operator.static interface
TheEQ
operator.static interface
TheE
function.static interface
TheEXCLUDED
function.static interface
TheEXECUTE
function.static interface
TheEXISTS
function.static interface
static interface
TheEXP
function.static interface
static interface
ACondition
that is alwaysFALSE
.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
QOM.FullJoin<R extends Record>
static interface
static interface
TheGE
operator.static interface
static enum
TheGenerationLocation
type.static enum
TheGenerationOption
type.static interface
TheGE
operator.static interface
TheGOTO
function.static interface
TheGRANT
statement.static interface
static interface
static interface
TheGT
operator.static interface
TheGT
operator.static interface
QOM.HintedTable<R extends Record>
A table with a MySQL style index access hint.static enum
TheIdentityRestartOption
type.static interface
static interface
static interface
TheIN
operator.static interface
TheIN
predicate accepting a list of values.static interface
QOM.Insert<R extends Record>
TheINSERT
statement.static interface
TheINSERTING
function.static interface
QOM.InsertReturning<R extends Record>
AnINSERT
statement with aRETURNING
clause.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
static interface
QOM.JoinTable<R extends Record,
J extends QOM.JoinTable<R, J>> static interface
TheJSON ARRAY
function.static interface
static interface
TheJSONB GET ATTRIBUTE
function.static interface
TheJSONB GET ATTRIBUTE AS TEXT
function.static interface
TheJSONB GET ELEMENT
function.static interface
TheJSONB GET ELEMENT AS TEXT
function.static interface
TheJSONB INSERT
function.static interface
TheJSONB KEYS
function.static interface
TheJSONB REMOVE
function.static interface
TheJSONB REPLACE
function.static interface
TheJSONB SET
function.static interface
TheJSON GET ATTRIBUTE
function.static interface
TheJSON GET ATTRIBUTE AS TEXT
function.static interface
TheJSON GET ELEMENT
function.static interface
TheJSON GET ELEMENT AS TEXT
function.static interface
TheJSON INSERT
function.static interface
TheJSON KEYS
function.static interface
TheJSON OBJECT
function.static interface
static enum
TheJSONOnNull
type.static interface
TheJSON REMOVE
function.static interface
TheJSON REPLACE
function.static interface
TheJSON SET
function.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
QOM.LeftAntiJoin<R extends Record>
static interface
QOM.LeftJoin<R extends Record>
static interface
QOM.LeftSemiJoin<R extends Record>
static interface
TheLE
operator.static interface
TheLEVEL
function.static interface
TheLIKE
operator.static interface
TheLIKE IGNORE CASE
operator.static interface
TheLIKE
operator.static interface
QOM.LinkedTable<R extends Record>
A table with a database link.static interface
TheLN
function.static interface
TheLOG
function.static interface
TheLOG10
function.static interface
static interface
TheLOWER
function.static interface
TheLPAD
function.static interface
TheLT
operator.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
QOM.NaturalFullJoin<R extends Record>
static interface
QOM.NaturalJoin<R extends Record>
static interface
QOM.NaturalLeftJoin<R extends Record>
static interface
QOM.NaturalRightJoin<R extends Record>
static interface
TheNE
operator.static interface
static interface
TheNE
operator.static interface
TheNOT
operator.static interface
TheNOT
operator.static interface
TheNOT IN
operator.static interface
TheNOT IN
predicate accepting a list of values.static interface
TheNOT LIKE
operator.static interface
TheNOT LIKE IGNORE CASE
operator.static interface
TheNOT LIKE
operator.static interface
TheNOT SIMILAR TO
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 interface
ACondition
that is alwaysNULL
.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
QOM.OuterApply<R extends Record>
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
QOM.QualifiedJoin<R extends Record,
J extends QOM.QualifiedJoin<R, J>> static interface
TheROWID
operator.static interface
static interface
static interface
QOM.QuantifiedSelect<R extends Record>
static enum
TheQuantifier
type.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
TheRELEASE SAVEPOINT
statement.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
QOM.RightJoin<R extends Record>
static interface
TheROLLBACK
statement.static interface
static interface
TheROUND
function.static interface
QOM.RowAsField<R extends Record>
static interface
static interface
TheROW EQ
operator.static interface
TheROW GE
operator.static interface
TheROW GT
operator.static interface
static interface
static interface
TheROW LE
operator.static interface
TheROW LT
operator.static interface
TheROW NE
operator.static interface
TheROWNUM
function.static interface
static interface
static interface
static interface
static interface
TheRPAD
function.static interface
TheRTRIM
function.static interface
TheSAVEPOINT
statement.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
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
TheSTART TRANSACTION
statement.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
QOM.StraightJoin<R extends Record>
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.TableAsField<R extends Record>
static enum
TheTableCommitAction
type.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
ACondition
that is alwaysTRUE
.static interface
TheTRUNC
function.static interface
QOM.Truncate<R extends Record>
TheTRUNCATE
statement.static interface
QOM.Tuple2<Q1 extends QueryPart,
Q2 extends QueryPart> A generic tuple of degree 2 for use inQOM
types.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
QOM.UnmodifiableMap<K extends QueryPart,
V extends QueryPart> static interface
QOM.Update<R extends Record>
TheUPDATE
statement.static interface
QOM.UpdateReturning<R extends Record>
AnUPDATE
statement with aRETURNING
clause.static interface
TheUPDATING
function.static interface
TheUPPER
function.static interface
TheUUID
function.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
QOM.WithOrdinalityTable<R extends Record>
A collection derived table or table valued function with aWITH ORDINALITY
clause.static enum
TheWithOrWithoutData
type.static interface
QOM.WithTable<R extends Record>
A table with a T-SQL styleWITH
hint.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.static interface
TheXOR
operator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final <Q1 extends QueryPart,
Q2 extends QueryPart>
QOM.Tuple2<Q1,Q2> tuple
(Q1 q1, Q2 q2) static 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 <K extends QueryPart,
V extends QueryPart>
QOM.UnmodifiableMap<K,V> unmodifiable
(Map<K, V> map) Turn aMap
into an unmodifiableQOM.UnmodifiableMap
.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
. -
unmodifiable
@Internal public static final <K extends QueryPart,V extends QueryPart> QOM.UnmodifiableMap<K,V> unmodifiable(Map<K, V> map) Turn aMap
into an unmodifiableQOM.UnmodifiableMap
. -
tuple
@Internal public static final <Q1 extends QueryPart,Q2 extends QueryPart> QOM.Tuple2<Q1,Q2> tuple(Q1 q1, Q2 q2)
-