public interface QueryPart
extends java.io.Serializable
All QueryPart implementations can be cast to
QueryPartInternal in order to access the internal API.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Check whether this
QueryPart can be considered equal to
another QueryPart. |
int |
hashCode()
Generate a hash code from this
QueryPart. |
java.lang.String |
toString()
Render a SQL string representation of this
QueryPart. |
java.lang.String toString()
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.
If you wish to gain more control over the concrete SQL rendering of this
QueryPart, use DSLContext.renderContext() to obtain
a configurable render context for SQL rendering.
toString in class java.lang.ObjectQueryPartboolean equals(java.lang.Object object)
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.
equals in class java.lang.Objectobject - The other QueryPartint hashCode()
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.
hashCode in class java.lang.ObjectQueryPart hash codeCopyright © 2018. All Rights Reserved.