- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Name$name()Experimental query object model accessor method, see alsoQOM.default QueryPartTraverse aQueryParthierarchy and recursively replace its elements by alternatives.final Schema$schema()Experimental query object model accessor method, see alsoQOM.default <R> Rfinal voidClause[]Deprecated.- 3.11.0 - [#8179] - This functionality will be removed in the future.protected final DSLContextcreate()Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.protected final DSLContextcreate(Configuration configuration) Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.protected final DSLContextDeprecated.- 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 createUDTFieldobjects that are linked to this table.createField(Name name, DataType<T> type, UDT<R> udt, String comment) Subclasses may call this method to createUDTFieldobjects that are linked to this table.Subclasses may call this method to createUDTFieldobjects that are linked to this table.Subclasses may call this method to createUDTFieldobjects 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 createUDTFieldobjects that are linked to this table.default DataType<?>dataType(int index) Get the field data type for a given field index, ornullif no field is available at the index.default DataType<?>Get the field data type for a given qualified field name, ornullif no field is known to this type by this name.default DataType<?>Get the field data type for a given qualified field name, ornullif no field is known to this type by this name.default DataType<?>[]Get an array of field data types for this type.booleanSubclasses may override thisbooleanSubclasses may override thisbooleanSubclasses may override thisbooleanSubclasses may override thisbooleanSubclasses may override thisbooleanCheck whether thisQueryPartcan be considered equal to anotherQueryPart.default Field<?>field(int index) Get a field known to this type by index, ornullif no field is available at the index.default <T> Field<T>Get a field known to this type by index coerced totype, ornullif no field is available at the index.default <T> Field<T>Get a field known to this type by index coerced todataType, ornullif 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 RowGet all fields known to this type as aRow.Get all fields known to this type as aStream.booleanSubclasses may override thisfinal CatalogGet the object's catalog.final StringThe comment on this object.final CommentThe comment on this object as aQueryPart.final StringgetName()The unqualified name of this object.final PackageGet the UDT package if this is aUDT, ornullif 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 parameterRfor other types thanRecordGet the object's schema.final NameThe unqualified name of this object.inthashCode()Generate a hash code from thisQueryPart.default intGet a field's index from this type.default intGet a field's index from this type.default intGet a field's index from this type.final booleanWhether this data type can be used from SQL statements.final booleanWhether this data type is a synthetic, structural UDT type.final RbooleanrendersContent(Context<?> ctx) Subclasses may override thistoString()Render a SQL string representation of thisQueryPart.protected final DataAccessExceptiontranslate(String sql, SQLException e) Internal convenience methoddefault Class<?>type(int index) Get the field type for a given field index, ornullif no field is available at the index.default Class<?>Get the field type for a given unqualified field name, ornullif no field is known to this type by this name.default Class<?>Get the field type for a given qualified field name, ornullif 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, waitMethods inherited from interface org.jooq.Named
$name, getComment, getCommentPart, getName, getUnqualifiedName
-
Constructor Details
-
UDTImpl
-
UDTImpl
-
UDTImpl
-
-
Method Details
-
getCatalog
Description copied from interface:QualifiedGet the object's catalog.- Specified by:
getCatalogin interfaceQualified
-
getSchema
Description copied from interface:QualifiedGet the object's schema. -
getQualifiedName
Description copied from interface:NamedThe qualified name of this object.- Specified by:
getQualifiedNamein interfaceNamed
-
getPackage
Description copied from interface:RecordQualifierGet the UDT package if this is aUDT, ornullif it is not a UDT, or if it is a schema level UDT defined outside of a package.- Specified by:
getPackagein interfaceRecordQualifier<R extends UDTRecord<R>>
-
fieldsRow
Description copied from interface:FieldsGet all fields known to this type as aRow. -
getRecordType
Subclasses must override this method if they use the generic type parameterRfor other types thanRecord- Specified by:
getRecordTypein interfaceRecordQualifier<R extends UDTRecord<R>>
-
isSQLUsable
public final boolean isSQLUsable()Description copied from interface:UDTWhether this data type can be used from SQL statements.- Specified by:
isSQLUsablein interfaceUDT<R extends UDTRecord<R>>
-
isSynthetic
public final boolean isSynthetic()Description copied from interface:UDTWhether this data type is a synthetic, structural UDT type.This is
truefor example:- For Oracle
TAB%ROWTYPEreferences, which are synthetic PL/SQL RECORD types in PL/SQL.
- Specified by:
isSyntheticin interfaceUDT<R extends UDTRecord<R>>
- For Oracle
-
newRecord
Description copied from interface:RecordQualifier- Specified by:
newRecordin interfaceRecordQualifier<R extends UDTRecord<R>>- See Also:
-
getDataType
Description copied from interface:RecordQualifier- Specified by:
getDataTypein interfaceRecordQualifier<R extends UDTRecord<R>>
-
accept
Description copied from interface:QueryPartInternalThisQueryPartcanacceptaContextobject in order to render a SQL string or to bind its variables.- Specified by:
acceptin 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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 createUDTFieldobjects 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:QualifiedExperimental query object model accessor method, see alsoQOM. Subject to change in future jOOQ versions, use at your own risk. -
fields
Description copied from interface:FieldsGet all fields known to this type. -
fieldStream
Description copied from interface:FieldsGet all fields known to this type as aStream.- Specified by:
fieldStreamin interfaceFields
-
field
Description copied from interface:FieldsGet 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.
nullotherwise.
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:FieldsGet a field known to this type by unqualified name, ornullif 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:FieldsGet a field known to this type by unqualified name coerced totype, ornullif 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, DataType).Description copied from interface:FieldsGet a field known to this type by unqualified name coerced todataType, ornullif 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:FieldsGet a field known to this type by qualified name, ornullif 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.
nullotherwise.
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:FieldsGet a field known to this type by qualified name coerced totype, ornullif 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.
nullotherwise.
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, DataType).Description copied from interface:FieldsGet a field known to this type by qualified name coerced todataType, ornullif 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.
nullotherwise.
If several fields have the same ambiguous name, the first one is returned and a warning is logged.
-
field
Description copied from interface:FieldsGet a field known to this type by index, ornullif no field is available at the index. -
field
Description copied from interface:FieldsGet a field known to this type by index coerced totype, ornullif no field is available at the index. -
field
Description copied from interface:FieldsGet a field known to this type by index coerced todataType, ornullif no field is available at the index. -
fields
Description copied from interface:FieldsGet all fields, filtering by some fields.- Specified by:
fieldsin interfaceFields- Parameters:
fields- The fields to include after looking them up viaFields.field(Field).- See Also:
-
fields
Description copied from interface:FieldsGet all fields known to this type, filtering by some unqualified field names.- Specified by:
fieldsin interfaceFields- Parameters:
names- The unqualified field names to include after looking them up viaFields.field(String).- See Also:
-
fields
Description copied from interface:FieldsGet all fields known to this type, filtering by some qualified field names.- Specified by:
fieldsin interfaceFields- Parameters:
names- The qualified field names to include after looking them up viaFields.field(Name).- See Also:
-
fields
Description copied from interface:FieldsGet all fields known to this type, filtering by some field indexes. -
indexOf
Description copied from interface:FieldsGet a field's index from this type.The lookup algorithm is the same as that of
Fields.field(Field). -
indexOf
Description copied from interface:FieldsGet a field's index from this type.The lookup algorithm is the same as that of
Fields.field(String). -
indexOf
Description copied from interface:FieldsGet a field's index from this type.The lookup algorithm is the same as that of
Fields.field(Name). -
types
Description copied from interface:FieldsGet an array of field types for fields known to this type.Entries in the resulting array correspond to
Typed.getType()for the correspondingFieldinFields.fields() -
type
Description copied from interface:FieldsGet the field type for a given field index, ornullif no field is available at the index. -
type
Description copied from interface:FieldsGet the field type for a given unqualified field name, ornullif 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:FieldsGet the field type for a given qualified field name, ornullif 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:FieldsGet an array of field data types for this type.Entries in the resulting array correspond to
Typed.getDataType()for the correspondingFieldinFields.fields() -
dataType
Description copied from interface:FieldsGet the field data type for a given field index, ornullif no field is available at the index. -
dataType
Description copied from interface:FieldsGet the field data type for a given qualified field name, ornullif 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:FieldsGet the field data type for a given qualified field name, ornullif 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:QueryPartTraverser thisQueryPartexpression 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
CollectorAPI to theTraverserAPI usingTraversers.collecting(Collector).CUSTOMER.NAME.eq(1).$traverse(Traversers.collecting(Collectors.counting()));Unlike a
Collector, aTraverseris 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 aQueryPartsubtree, 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:NamedThe unqualified name of this object. -
getUnqualifiedName
Description copied from interface:NamedThe unqualified name of this object.- Specified by:
getUnqualifiedNamein interfaceNamed
-
getComment
Description copied from interface:NamedThe comment on this object.This is the same as calling
Named.getCommentPart()and thenComment.getComment().- Specified by:
getCommentin interfaceNamed
-
getCommentPart
Description copied from interface:NamedThe comment on this object as aQueryPart.- Specified by:
getCommentPartin interfaceNamed
-
hashCode
public int hashCode()Description copied from interface:QueryPartGenerate a hash code from thisQueryPart.In general,
QueryParthash codes are the same as the hash codes generated fromQueryPart.toString(). This guarantees consistent behaviour withQueryPart.equals(Object)Some
QueryPartimplementations may choose to override this behaviour for improved performance, asQueryPart.toString()is an expensive operation, if called many times. -
equals
Description copied from interface:QueryPartCheck whether thisQueryPartcan be considered equal to anotherQueryPart.In general,
QueryPartequality 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
QueryPartimplementations may choose to override this behaviour for improved performance, asQueryPart.toString()is an expensive operation, if called many times. -
$name
Description copied from interface:NamedExperimental 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:QueryPartInternalTheClauses that are represented by this query part.QueryParts can specify severalClauses 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:
clausesin interfaceQueryPartInternal- Returns:
- The
Clauses represented by this query part ornullor an empty array if this query part does not represent a clause.
-
rendersContent
Subclasses may override this- Specified by:
rendersContentin interfaceQueryPartInternal
-
declaresFields
public boolean declaresFields()Subclasses may override this- Specified by:
declaresFieldsin interfaceQueryPartInternal
-
declaresTables
public boolean declaresTables()Subclasses may override this- Specified by:
declaresTablesin interfaceQueryPartInternal
-
declaresWindows
public boolean declaresWindows()Subclasses may override this- Specified by:
declaresWindowsin interfaceQueryPartInternal
-
declaresCTE
public boolean declaresCTE()Subclasses may override this- Specified by:
declaresCTEin interfaceQueryPartInternal
-
declaresParameters
Subclasses may override this- Specified by:
declaresParametersin interfaceQueryPartInternal
-
generatesCast
public boolean generatesCast()Subclasses may override this- Specified by:
generatesCastin interfaceQueryPartInternal
-
toString
Description copied from interface:QueryPartRender a SQL string representation of thisQueryPart.For improved debugging, this renders a SQL string of this
QueryPartwith inlined bind variables. If thisQueryPartisAttachable, then the attachedConfigurationmay be used for rendering the SQL string, includingSQLDialectandSettings. Do note that mostQueryPartinstances 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
-