- All Implemented Interfaces:
Serializable
,Fields
,Named
,Qualified
,QueryPart
,QueryPartInternal
,RecordQualifier<R>
,UDT<R>
This type is for JOOQ INTERNAL USE only. Do not reference directly
- Author:
- Lukas Eder
- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated.- [#15583] - 3.19.0 - Please re-generate your code.Deprecated.- [#15583] - 3.19.0 - Please re-generate your code.Deprecated.- [#15583] - 3.19.0 - Please re-generate your code. -
Method Summary
Modifier and TypeMethodDescriptionfinal Name
$name()
Experimental query object model accessor method, see alsoQOM
.default QueryPart
Traverse aQueryPart
hierarchy and recursively replace its elements by alternatives.final Schema
$schema()
Experimental query object model accessor method, see alsoQOM
.default <R> R
final void
Clause[]
Deprecated.- 3.11.0 - [#8179] - This functionality will be removed in the future.protected final DSLContext
create()
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.protected final DSLContext
create
(Configuration configuration) Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.protected final DSLContext
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.createField
(String name, DataType<T> type, UDT<R> udt) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT)
instead.createField
(String name, DataType<T> type, UDT<R> udt, String comment) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String)
instead.Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String, Binding)
instead.Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String, Converter)
instead.createField
(String name, DataType<T> type, UDT<R> udt, String comment, Converter<X, U> converter, Binding<T, X> binding) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String, Converter, Binding)
instead.createField
(Name name, DataType<T> type, UDT<R> udt) Subclasses may call this method to createUDTField
objects that are linked to this table.createField
(Name name, DataType<T> type, UDT<R> udt, String comment) Subclasses may call this method to createUDTField
objects that are linked to this table.Subclasses may call this method to createUDTField
objects that are linked to this table.Subclasses may call this method to createUDTField
objects that are linked to this table.createField
(Name name, DataType<T> type, UDT<R> udt, String comment, Converter<X, U> converter, Binding<T, X> binding) Subclasses may call this method to createUDTField
objects that are linked to this table.default DataType<?>
dataType
(int index) Get the field data type for a given field index, ornull
if no field is available at the index.default DataType<?>
Get the field data type for a given qualified field name, ornull
if no field is known to this type by this name.default DataType<?>
Get the field data type for a given qualified field name, ornull
if no field is known to this type by this name.default DataType<?>[]
Get an array of field data types for this type.boolean
Subclasses may override thisboolean
Subclasses may override thisboolean
Subclasses may override thisboolean
Subclasses may override thisboolean
Subclasses may override thisboolean
Check whether thisQueryPart
can be considered equal to anotherQueryPart
.default Field<?>
field
(int index) Get a field known to this type by index, ornull
if no field is available at the index.default <T> Field<T>
Get a field known to this type by index coerced totype
usingField.coerce(Class)
, ornull
if no field is available at the index.default <T> Field<T>
Get a field known to this type by index coerced todataType
usingField.coerce(DataType)
, ornull
if no field is available at the index.default Field<?>
Deprecated.This method hides static importDSL.field(String)
.default <T> Field<T>
Deprecated.This method hides static importDSL.field(String, Class)
.default <T> Field<T>
Deprecated.This method hides static importDSL.field(String, DataType)
.default <T> Field<T>
Get a field known to this type by field reference.default Field<?>
Deprecated.This method hides static importDSL.field(Name)
.default <T> Field<T>
Deprecated.This method hides static importDSL.field(Name, Class)
.default <T> Field<T>
Deprecated.This method hides static importDSL.field(String, DataType)
.default Field<?>[]
fields()
Get all fields known to this type.default Field<?>[]
fields
(int... indexes) Get all fields known to this type, filtering by some field indexes.default Field<?>[]
Get all fields known to this type, filtering by some unqualified field names.default Field<?>[]
Get all fields, filtering by some fields.default Field<?>[]
Get all fields known to this type, filtering by some qualified field names.final Row
Get all fields known to this type as aRow
.Get all fields known to this type as aStream
.boolean
Subclasses may override thisfinal Catalog
Get the object's catalog.final String
The comment on this object.final Comment
The comment on this object as aQueryPart
.final String
getName()
The unqualified name of this object.final Package
Get the UDT package if this is aUDT
, ornull
if it is not a UDT, or if it is a schema level UDT defined outside of a package.The qualified name of this object.Subclasses must override this method if they use the generic type parameterR
for other types thanRecord
Get the object's schema.final Name
The unqualified name of this object.int
hashCode()
Generate a hash code from thisQueryPart
.default int
Get a field's index from this type.default int
Get a field's index from this type.default int
Get a field's index from this type.final boolean
Whether this data type can be used from SQL statements.final boolean
Whether this data type is a synthetic, structural UDT type.final R
boolean
rendersContent
(Context<?> ctx) Subclasses may override thistoString()
Render a SQL string representation of thisQueryPart
.protected final DataAccessException
translate
(String sql, SQLException e) Internal convenience methoddefault Class<?>
type
(int index) Get the field type for a given field index, ornull
if no field is available at the index.default Class<?>
Get the field type for a given unqualified field name, ornull
if no field is known to this type by this name.default Class<?>
Get the field type for a given qualified field name, ornull
if no field is known to this type by this name.default Class<?>[]
types()
Get an array of field types for fields known to this type.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jooq.Named
$name, getComment, getCommentPart, getName, getUnqualifiedName
-
Constructor Details
-
UDTImpl
Deprecated.- [#15583] - 3.19.0 - Please re-generate your code. -
UDTImpl
Deprecated.- [#15583] - 3.19.0 - Please re-generate your code. -
UDTImpl
Deprecated.- [#15583] - 3.19.0 - Please re-generate your code. -
UDTImpl
-
UDTImpl
-
UDTImpl
-
-
Method Details
-
getCatalog
Description copied from interface:Qualified
Get the object's catalog.- Specified by:
getCatalog
in interfaceQualified
-
getSchema
Description copied from interface:Qualified
Get the object's schema. -
getQualifiedName
Description copied from interface:Named
The qualified name of this object.- Specified by:
getQualifiedName
in interfaceNamed
-
getPackage
Description copied from interface:RecordQualifier
Get the UDT package if this is aUDT
, ornull
if it is not a UDT, or if it is a schema level UDT defined outside of a package.- Specified by:
getPackage
in interfaceRecordQualifier<R extends UDTRecord<R>>
-
fieldsRow
Description copied from interface:Fields
Get all fields known to this type as aRow
. -
getRecordType
Subclasses must override this method if they use the generic type parameterR
for other types thanRecord
- Specified by:
getRecordType
in interfaceRecordQualifier<R extends UDTRecord<R>>
-
isSQLUsable
public final boolean isSQLUsable()Description copied from interface:UDT
Whether this data type can be used from SQL statements.- Specified by:
isSQLUsable
in interfaceUDT<R extends UDTRecord<R>>
-
isSynthetic
public final boolean isSynthetic()Description copied from interface:UDT
Whether this data type is a synthetic, structural UDT type.This is
true
for example:- For Oracle
TAB%ROWTYPE
references, which are synthetic PL/SQL RECORD types in PL/SQL.
- Specified by:
isSynthetic
in interfaceUDT<R extends UDTRecord<R>>
- For Oracle
-
newRecord
Description copied from interface:RecordQualifier
- Specified by:
newRecord
in interfaceRecordQualifier<R extends UDTRecord<R>>
- See Also:
-
getDataType
Description copied from interface:RecordQualifier
- Specified by:
getDataType
in interfaceRecordQualifier<R extends UDTRecord<R>>
-
accept
Description copied from interface:QueryPartInternal
ThisQueryPart
canaccept
aContext
object in order to render a SQL string or to bind its variables.- Specified by:
accept
in interfaceQueryPartInternal
-
createField
@Deprecated protected static final <R extends UDTRecord<R>,T> UDTField<R,T> createField(String name, DataType<T> type, UDT<R> udt) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT)
instead.Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
@Deprecated protected static final <R extends UDTRecord<R>,T> UDTField<R,T> createField(String name, DataType<T> type, UDT<R> udt, String comment) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String)
instead.Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
@Deprecated protected static final <R extends UDTRecord<R>,T, UDTField<R,U> U> createField(String name, DataType<T> type, UDT<R> udt, String comment, Converter<T, U> converter) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String, Converter)
instead.Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
@Deprecated protected static final <R extends UDTRecord<R>,T, UDTField<R,U> U> createField(String name, DataType<T> type, UDT<R> udt, String comment, Binding<T, U> binding) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String, Binding)
instead.Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
@Deprecated protected static final <R extends UDTRecord<R>,T, UDTField<R,X, U> U> createField(String name, DataType<T> type, UDT<R> udt, String comment, Converter<X, U> converter, Binding<T, X> binding) Deprecated.- 3.12.0 - [#8000] - UsecreateField(Name, DataType, UDT, String, Converter, Binding)
instead.Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
protected static final <R extends UDTRecord<R>,T> UDTField<R,T> createField(Name name, DataType<T> type, UDT<R> udt) Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
protected static final <R extends UDTRecord<R>,T> UDTField<R,T> createField(Name name, DataType<T> type, UDT<R> udt, String comment) Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
protected static final <R extends UDTRecord<R>,T, UDTField<R,U> U> createField(Name name, DataType<T> type, UDT<R> udt, String comment, Converter<T, U> converter) Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
protected static final <R extends UDTRecord<R>,T, UDTField<R,U> U> createField(Name name, DataType<T> type, UDT<R> udt, String comment, Binding<T, U> binding) Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
createField
protected static final <R extends UDTRecord<R>,T, UDTField<R,X, U> U> createField(Name name, DataType<T> type, UDT<R> udt, String comment, Converter<X, U> converter, Binding<T, X> binding) Subclasses may call this method to createUDTField
objects that are linked to this table.- Parameters:
name
- The name of the field (case-sensitive!)type
- The data type of the field
-
$schema
Description copied from interface:Qualified
Experimental query object model accessor method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
fields
Description copied from interface:Fields
Get all fields known to this type. -
fieldStream
Description copied from interface:Fields
Get all fields known to this type as aStream
.- Specified by:
fieldStream
in interfaceFields
-
field
Description copied from interface:Fields
Get a field known to this type by field reference.This will return:
- A field that is the same as the argument field (by identity comparison).
- A field that is equal to the argument field (exact matching fully qualified name).
- A field that is equal to the argument field (partially matching qualified name).
- A field whose name is equal to the unqualified name of the argument field.
null
otherwise.
If several fields have the same ambiguous name, the first one is returned and a warning is logged.
-
field
Deprecated.This method hides static importDSL.field(String)
.Description copied from interface:Fields
Get a field known to this type by unqualified name, ornull
if no field is known to this type by this name.If several fields have the same ambiguous name, the first one is returned and a warning is logged.
-
field
Deprecated.This method hides static importDSL.field(String, Class)
.Description copied from interface:Fields
Get a field known to this type by unqualified name coerced totype
usingField.coerce(Class)
, ornull
if no field is known to this type by this name.If several fields have the same ambiguous name, the first one is returned and a warning is logged.
NOTE [#15286]: It is strongly recommended to pass only
Class
references of types supported by jOOQ internally, i.e. types fromSQLDataType
. If you're using any custom data types by means of aConverter
orBinding
, it's better to pass that convertedDataType
reference explicitly toFields.field(Name, DataType)
. -
field
Deprecated.This method hides static importDSL.field(String, DataType)
.Description copied from interface:Fields
Get a field known to this type by unqualified name coerced todataType
usingField.coerce(DataType)
, ornull
if no field is known to this type by this name.If several fields have the same ambiguous name, the first one is returned and a warning is logged.
-
field
Deprecated.This method hides static importDSL.field(Name)
.Description copied from interface:Fields
Get a field known to this type by qualified name, ornull
if no field is known to this type by this name.This will return:
- A field whose name is equal to the argument field's name (exact matching fully qualified name).
- A field whose name is equal to the argument field's name (partially matching qualified name).
- A field whose name is equal to the unqualified name of the argument field.
null
otherwise.
If several fields have the same ambiguous name, the first one is returned and a warning is logged.
-
field
Deprecated.This method hides static importDSL.field(Name, Class)
.Description copied from interface:Fields
Get a field known to this type by qualified name coerced totype
usingField.coerce(Class)
, ornull
if no field is known to this type by this name.This will return:
- A field whose name is equal to the argument field's name (exact matching fully qualified name).
- A field whose name is equal to the argument field's name (partially matching qualified name).
- A field whose name is equal to the unqualified name of the argument field.
null
otherwise.
If several fields have the same ambiguous name, the first one is returned and a warning is logged.
NOTE [#15286]: It is strongly recommended to pass only
Class
references of types supported by jOOQ internally, i.e. types fromSQLDataType
. If you're using any custom data types by means of aConverter
orBinding
, it's better to pass that convertedDataType
reference explicitly toFields.field(Name, DataType)
. -
field
Deprecated.This method hides static importDSL.field(String, DataType)
.Description copied from interface:Fields
Get a field known to this type by qualified name coerced todataType
usingField.coerce(DataType)
, ornull
if no field is known to this type by this name.This will return:
- A field whose name is equal to the argument field's name (exact matching fully qualified name).
- A field whose name is equal to the argument field's name (partially matching qualified name).
- A field whose name is equal to the unqualified name of the argument field.
null
otherwise.
If several fields have the same ambiguous name, the first one is returned and a warning is logged.
-
field
Description copied from interface:Fields
Get a field known to this type by index, ornull
if no field is available at the index. -
field
Description copied from interface:Fields
Get a field known to this type by index coerced totype
usingField.coerce(Class)
, ornull
if no field is available at the index.NOTE [#15286]: It is strongly recommended to pass only
Class
references of types supported by jOOQ internally, i.e. types fromSQLDataType
. If you're using any custom data types by means of aConverter
orBinding
, it's better to pass that convertedDataType
reference explicitly toFields.field(Name, DataType)
. -
field
Description copied from interface:Fields
Get a field known to this type by index coerced todataType
usingField.coerce(DataType)
, ornull
if no field is available at the index. -
fields
Description copied from interface:Fields
Get all fields, filtering by some fields.- Specified by:
fields
in interfaceFields
- Parameters:
fields
- The fields to include after looking them up viaFields.field(Field)
.- See Also:
-
fields
Description copied from interface:Fields
Get all fields known to this type, filtering by some unqualified field names.- Specified by:
fields
in interfaceFields
- Parameters:
names
- The unqualified field names to include after looking them up viaFields.field(String)
.- See Also:
-
fields
Description copied from interface:Fields
Get all fields known to this type, filtering by some qualified field names.- Specified by:
fields
in interfaceFields
- Parameters:
names
- The qualified field names to include after looking them up viaFields.field(Name)
.- See Also:
-
fields
Description copied from interface:Fields
Get all fields known to this type, filtering by some field indexes. -
indexOf
Description copied from interface:Fields
Get a field's index from this type.The lookup algorithm is the same as that of
Fields.field(Field)
. -
indexOf
Description copied from interface:Fields
Get a field's index from this type.The lookup algorithm is the same as that of
Fields.field(String)
. -
indexOf
Description copied from interface:Fields
Get a field's index from this type.The lookup algorithm is the same as that of
Fields.field(Name)
. -
types
Description copied from interface:Fields
Get an array of field types for fields known to this type.Entries in the resulting array correspond to
Typed.getType()
for the correspondingField
inFields.fields()
-
type
Description copied from interface:Fields
Get the field type for a given field index, ornull
if no field is available at the index. -
type
Description copied from interface:Fields
Get the field type for a given unqualified field name, ornull
if no field is known to this type by this name.The lookup algorithm is the same as that of
Fields.field(String)
. -
type
Description copied from interface:Fields
Get the field type for a given qualified field name, ornull
if no field is known to this type by this name.The lookup algorithm is the same as that of
Fields.field(Name)
. -
dataTypes
Description copied from interface:Fields
Get an array of field data types for this type.Entries in the resulting array correspond to
Typed.getDataType()
for the correspondingField
inFields.fields()
-
dataType
Description copied from interface:Fields
Get the field data type for a given field index, ornull
if no field is available at the index. -
dataType
Description copied from interface:Fields
Get the field data type for a given qualified field name, ornull
if no field is known to this type by this name.The lookup algorithm is the same as that of
Fields.field(String)
. -
dataType
Description copied from interface:Fields
Get the field data type for a given qualified field name, ornull
if no field is known to this type by this name.The lookup algorithm is the same as that of
Fields.field(Name)
. -
$traverse
Description copied from interface:QueryPart
Traverser thisQueryPart
expression tree using a composableTraverser
, producing a result.This offers a generic way to traverse expression trees to translate the tree to arbitrary other data structures. The simplest traversal would just count all the tree elements:
int count = CUSTOMER.NAME.eq(1).$traverse(0, (i, p) -> i + 1);
The same can be achieved by translating the JDK
Collector
API to theTraverser
API usingTraversers.collecting(Collector)
.CUSTOMER.NAME.eq(1).$traverse(Traversers.collecting(Collectors.counting()));
Unlike a
Collector
, aTraverser
is optimised for tree traversal, not stream traversal:- Is not designed for parallelism
- It can
Traverser.abort()
traversal early when the result can be produced early (e.g. when runningTraversers.containing(QueryPart)
, and a result has been found). - It can decide whether to
Traverser.recurse()
into aQueryPart
subtree, or whether that is not necessary or even undesirable, e.g. to prevent entering new subquery scopes. - Unlike a Collector, which can use its
Collector.accumulator()
to accumulate each element only once, in tree traversal, it's desirable to be able to distinguish between accumulating an itemTraverser.before()
orTraverser.after()
recursing into it. This is useful e.g. to wrap each tree node in XML opening and closing tags.
This is a commercial jOOQ edition only feature.
-
$replace
Description copied from interface:QueryPart
-
getName
Description copied from interface:Named
The unqualified name of this object. -
getUnqualifiedName
Description copied from interface:Named
The unqualified name of this object.- Specified by:
getUnqualifiedName
in interfaceNamed
-
getComment
Description copied from interface:Named
The comment on this object.This is the same as calling
Named.getCommentPart()
and thenComment.getComment()
.- Specified by:
getComment
in interfaceNamed
-
getCommentPart
Description copied from interface:Named
The comment on this object as aQueryPart
.- Specified by:
getCommentPart
in interfaceNamed
-
hashCode
public int hashCode()Description copied from interface:QueryPart
Generate a hash code from thisQueryPart
.In general,
QueryPart
hash codes are the same as the hash codes generated fromQueryPart.toString()
. This guarantees consistent behaviour withQueryPart.equals(Object)
Some
QueryPart
implementations may choose to override this behaviour for improved performance, asQueryPart.toString()
is an expensive operation, if called many times. -
equals
Description copied from interface:QueryPart
Check whether thisQueryPart
can be considered equal to anotherQueryPart
.In general,
QueryPart
equality is defined in terms ofQueryPart.toString()
equality. In other words, two query parts are considered equal if their rendered SQL (with inlined bind variables) is equal. This means that the two query parts do not necessarily have to be of the same type.Some
QueryPart
implementations may choose to override this behaviour for improved performance, asQueryPart.toString()
is an expensive operation, if called many times. -
$name
Description copied from interface:Named
Experimental query object model accessor method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
clauses
Deprecated.- 3.11.0 - [#8179] - This functionality will be removed in the future.Description copied from interface:QueryPartInternal
TheClause
s that are represented by this query part.QueryPart
s can specify severalClause
s for which an event will be emittedbefore
(in forward order) andafter
(in reverse order) visiting the the query part throughContext.visit(QueryPart)
This method is for JOOQ INTERNAL USE only. Do not reference directly
- Specified by:
clauses
in interfaceQueryPartInternal
- Returns:
- The
Clause
s represented by this query part ornull
or an empty array if this query part does not represent a clause.
-
rendersContent
Subclasses may override this- Specified by:
rendersContent
in interfaceQueryPartInternal
-
declaresFields
public boolean declaresFields()Subclasses may override this- Specified by:
declaresFields
in interfaceQueryPartInternal
-
declaresTables
public boolean declaresTables()Subclasses may override this- Specified by:
declaresTables
in interfaceQueryPartInternal
-
declaresWindows
public boolean declaresWindows()Subclasses may override this- Specified by:
declaresWindows
in interfaceQueryPartInternal
-
declaresCTE
public boolean declaresCTE()Subclasses may override this- Specified by:
declaresCTE
in interfaceQueryPartInternal
-
declaresParameters
Subclasses may override this- Specified by:
declaresParameters
in interfaceQueryPartInternal
-
generatesCast
public boolean generatesCast()Subclasses may override this- Specified by:
generatesCast
in interfaceQueryPartInternal
-
toString
Description copied from interface:QueryPart
Render a SQL string representation of thisQueryPart
.For improved debugging, this renders a SQL string of this
QueryPart
with inlined bind variables. If thisQueryPart
isAttachable
, then the attachedConfiguration
may be used for rendering the SQL string, includingSQLDialect
andSettings
. Do note that mostQueryPart
instances are not attached to aConfiguration
, and thus there is no guarantee that the SQL string will make sense in the context of a specific database. -
create
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.Internal convenience method -
create
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.Internal convenience method -
create
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.Internal convenience method -
translate
Internal convenience method
-