Top Description Methods
org.jooq

public Interface QueryPart

extends Serializable
Known Direct Subinterfaces
org.jooq.QueryPartInternal, org.jooq.Typed, org.jooq.WindowSpecification, org.jooq.CharacterSet, org.jooq.Collation, org.jooq.ColumnElement, org.jooq.DerivedColumnList, org.jooq.DerivedColumnList1, org.jooq.DerivedColumnList10, org.jooq.DerivedColumnList11, org.jooq.DerivedColumnList12, org.jooq.DerivedColumnList13, org.jooq.DerivedColumnList14, org.jooq.DerivedColumnList15, org.jooq.DerivedColumnList16, org.jooq.DerivedColumnList17, org.jooq.DerivedColumnList18, org.jooq.DerivedColumnList19, org.jooq.DerivedColumnList2, org.jooq.DerivedColumnList20, org.jooq.DerivedColumnList21, org.jooq.DerivedColumnList22, org.jooq.DerivedColumnList3, org.jooq.DerivedColumnList4, org.jooq.DerivedColumnList5, org.jooq.DerivedColumnList6, org.jooq.DerivedColumnList7, org.jooq.DerivedColumnList8, org.jooq.DerivedColumnList9, org.jooq.JSONEntry, org.jooq.AttachableQueryPart, org.jooq.Name, org.jooq.Named, org.jooq.OrderField, org.jooq.SQL, org.jooq.Statement, org.jooq.TableLike, org.jooq.GroupField, org.jooq.Keyword, org.jooq.WithStep, org.jooq.XMLAttributes, org.jooq.impl.QOM.Tuple2, org.jooq.impl.QOM.UnmodifiableMap, org.jooq.impl.QOM.UnmodifiableCollection, org.jooq.impl.QOM.With, org.jooq.impl.QOM.Aliasable, org.jooq.impl.QOM.Quantified, org.jooq.impl.QOM.UOperator, org.jooq.impl.QOM.UReturnsNullOnNullInput, org.jooq.impl.QOM.UProxy, org.jooq.impl.QOM.UEmpty, org.jooq.FieldOrRow, org.jooq.FieldOrRowOrSelect, org.jooq.SelectFieldOrAsterisk, org.jooq.Privilege, org.jooq.QuantifiedSelect
Imports
java.io.Serializable, java.util.function.BiFunction, .Function, .Supplier, java.util.stream.Collector, org.jooq.conf.Settings, org.jetbrains.annotations.NotNull, .ApiStatus.Experimental

The common base type for all objects that can be used for query composition.
Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

Whether the two query parts are equal
equals
(Object
The other QueryPart
object
)

Check whether this QueryPart can be considered equal to another QueryPart.

public int

Returns:

The QueryPart hash code
hashCode
()

Generate a hash code from this QueryPart.

public String

Returns:

A SQL string representation of this QueryPart
toString
()

Render a SQL string representation of this QueryPart.

Method Detail

equalsback to summary
public boolean equals(Object object)

Check whether this QueryPart can be considered equal to another QueryPart.

In general, QueryPart equality is defined in terms of 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, as toString() is an expensive operation, if called many times.

Parameters
object:Object

The other QueryPart

Returns:boolean

Whether the two query parts are equal

Annotations
@Override
hashCodeback to summary
public int hashCode()

Generate a hash code from this QueryPart.

In general, QueryPart hash codes are the same as the hash codes generated from toString(). This guarantees consistent behaviour with equals(Object)

Some QueryPart implementations may choose to override this behaviour for improved performance, as toString() is an expensive operation, if called many times.

Returns:int

The QueryPart hash code

Annotations
@Override
toStringback to summary
public String toString()

Render a SQL string representation of this QueryPart.

For improved debugging, this renders a SQL string of this QueryPart with inlined bind variables. If this QueryPart is Attachable, then the attached Configuration may be used for rendering the SQL string, including SQLDialect and Settings. Do note that most QueryPart instances are not attached to a Configuration, and thus there is no guarantee that the SQL string will make sense in the context of a specific database.

Returns:String

A SQL string representation of this QueryPart

Annotations
@Override