primaryKeyStream
Schema
- Specified by:
primaryKeyStream
in interfaceSchema
Serializable
, Named
, QueryPart
, QueryPartInternal
, Schema
Schema
singleton, for
use in generated code.final Name
$name()
QOM
.final QueryPart
QueryPart
hierarchy and recursively replace its
elements by alternatives.final <R> R
final void
Clause[]
protected final DSLContext
create()
Attachable.configuration()
and Configuration.dsl()
instead.protected final DSLContext
create(Configuration configuration)
Attachable.configuration()
and Configuration.dsl()
instead.protected final DSLContext
Attachable.configuration()
and Configuration.dsl()
instead.boolean
boolean
boolean
boolean
boolean
boolean
QueryPart
can be considered equal to
another QueryPart
.final Stream<ForeignKey<?,?>>
boolean
final Catalog
final String
final Comment
QueryPart
.final Domain<?>
null
if no such domain exists.final Domain<?>
null
if no such domain exists.final List<ForeignKey<?,?>>
final List<ForeignKey<?,?>>
getForeignKeys(String name)
final List<ForeignKey<?,?>>
getForeignKeys(Name name)
getIndexes(String name)
getIndexes(Name name)
final String
getName()
getPrimaryKeys(String name)
getPrimaryKeys(Name name)
final Sequence<?>
getSequence(String name)
null
if no such sequence exists.final Sequence<?>
getSequence(Name name)
null
if no such sequence exists.final Table<?>
null
if no such table exists.final Table<?>
null
if no such table exists.final Trigger
getTrigger(String name)
null
if no such trigger exists.final Trigger
getTrigger(Name name)
null
if no such trigger exists.final UDT<?>
null
if no such UDT exists.final UDT<?>
null
if no such UDT exists.getUDTs()
getUniqueKeys(String name)
getUniqueKeys(Name name)
final Name
int
hashCode()
QueryPart
.boolean
rendersContent(Context<?> ctx)
toString()
QueryPart
.protected final DataAccessException
translate(String sql,
SQLException e)
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
$name, getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
QueryPartInternal
QueryPart
can accept
a Context
object
in order to render a SQL string or to bind its variables.accept
in interface QueryPartInternal
Schema
getCatalog
in interface Schema
Schema
Schema
null
if no such table exists.Schema
null
if no such table exists.Schema
getPrimaryKeys
in interface Schema
Schema
getPrimaryKeys
in interface Schema
Schema
getPrimaryKeys
in interface Schema
Schema
getUniqueKeys
in interface Schema
Schema
getUniqueKeys
in interface Schema
Schema
getUniqueKeys
in interface Schema
Schema
getForeignKeys
in interface Schema
Schema
getForeignKeys
in interface Schema
Schema
getForeignKeys
in interface Schema
Schema
getIndexes
in interface Schema
Schema
getIndexes
in interface Schema
Schema
getIndexes
in interface Schema
Schema
Schema
null
if no such UDT exists.Schema
null
if no such UDT exists.Schema
getDomains
in interface Schema
Schema
null
if no such domain exists.Schema
null
if no such domain exists.Schema
getTriggers
in interface Schema
Schema
null
if no such trigger exists.getTrigger
in interface Schema
Schema
null
if no such trigger exists.getTrigger
in interface Schema
Schema
getSequences
in interface Schema
Schema
null
if no such sequence exists.getSequence
in interface Schema
Schema
null
if no such sequence exists.getSequence
in interface Schema
Schema
tableStream
in interface Schema
Schema
primaryKeyStream
in interface Schema
Schema
uniqueKeyStream
in interface Schema
Schema
foreignKeyStream
in interface Schema
Schema
indexStream
in interface Schema
Schema
Schema
domainStream
in interface Schema
Schema
triggerStream
in interface Schema
Schema
sequenceStream
in interface Schema
QueryPart
QueryPart
expression tree using a composable
Traverser
, 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
the Traverser
API using Traversers.collecting(Collector)
.
CUSTOMER.NAME.eq(1).$traverse(Traversers.collecting(Collectors.counting()));
Unlike a Collector
, a Traverser
is optimised for tree
traversal, not stream traversal:
Traverser.abort()
traversal early when the result can
be produced early (e.g. when running
Traversers.containing(QueryPart)
, and a result has been
found).Traverser.recurse()
into a
QueryPart
subtree, or whether that is not necessary or even
undesirable, e.g. to prevent entering new subquery scopes.Collector.accumulator()
to accumulate each element only once, in tree traversal, it's desirable
to be able to distinguish between accumulating an item
Traverser.before()
or Traverser.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.
QueryPart
Named
Named
getQualifiedName
in interface Named
Named
getUnqualifiedName
in interface Named
Named
This is the same as calling Named.getCommentPart()
and then
Comment.getComment()
.
getComment
in interface Named
Named
QueryPart
.getCommentPart
in interface Named
QueryPart
QueryPart
.
In general, QueryPart
hash codes are the same as the hash
codes generated from QueryPart.toString()
. This guarantees consistent
behaviour with QueryPart.equals(Object)
Some QueryPart
implementations may choose to override this
behaviour for improved performance, as QueryPart.toString()
is an
expensive operation, if called many times.
QueryPart
QueryPart
can be considered equal to
another QueryPart
.
In general, QueryPart
equality is defined in terms of
QueryPart.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 QueryPart.toString()
is an
expensive operation, if called many times.
Named
QOM
.
Subject to change in future jOOQ versions, use at your own risk.QueryPartInternal
Clause
s that are represented by this query part.
QueryPart
s can specify several Clause
s for which an
event will be emitted before
(in forward
order) and after
(in reverse order) visiting
the the query part through Context.visit(QueryPart)
This method is for JOOQ INTERNAL USE only. Do not reference directly
clauses
in interface QueryPartInternal
Clause
s represented by this query part or
null
or an empty array if this query part does not
represent a clause.rendersContent
in interface QueryPartInternal
declaresFields
in interface QueryPartInternal
declaresTables
in interface QueryPartInternal
declaresWindows
in interface QueryPartInternal
declaresCTE
in interface QueryPartInternal
declaresParameters
in interface QueryPartInternal
generatesCast
in interface QueryPartInternal
QueryPart
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.
Attachable.configuration()
and Configuration.dsl()
instead.Attachable.configuration()
and Configuration.dsl()
instead.Attachable.configuration()
and Configuration.dsl()
instead.