public interface TableOnStep
JOIN
clause,
where there must be a join criteria added using an ON
clause
(with a Condition
), or using a USING
clause (with a list
of Field
).Modifier and Type | Method and Description |
---|---|
TableOnConditionStep |
on(Condition... conditions)
Add an
ON clause to the JOIN . |
TableOnConditionStep |
on(Field<java.lang.Boolean> condition)
Add an
ON clause to the JOIN . |
TableOnConditionStep |
on(java.lang.String sql)
Add an
ON clause to the JOIN . |
TableOnConditionStep |
on(java.lang.String sql,
java.lang.Object... bindings)
Add an
ON clause to the JOIN . |
TableOnConditionStep |
on(java.lang.String sql,
QueryPart... parts)
Add an
ON clause to the JOIN . |
TableOnConditionStep |
onKey()
Join the table on a non-ambiguous foreign key relationship between the
two joined tables.
|
TableOnConditionStep |
onKey(ForeignKey<?,?> key)
Join the table on a non-ambiguous foreign key relationship between the
two joined tables.
|
TableOnConditionStep |
onKey(TableField<?,?>... keyFields)
Join the table on a non-ambiguous foreign key relationship between the
two joined tables.
|
Table<Record> |
using(java.util.Collection<? extends Field<?>> fields)
Join a table with the
USING(column [, column...]) |
Table<Record> |
using(Field<?>... fields)
Join a table with the
USING(column [, column...]) |
@Support TableOnConditionStep on(Condition... conditions)
ON
clause to the JOIN
.@Support TableOnConditionStep on(Field<java.lang.Boolean> condition)
ON
clause to the JOIN
.@Support TableOnConditionStep on(java.lang.String sql)
ON
clause to the JOIN
.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
DSL.condition(String)
@Support TableOnConditionStep on(java.lang.String sql, java.lang.Object... bindings)
ON
clause to the JOIN
.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
DSL.condition(String, Object...)
@Support TableOnConditionStep on(java.lang.String sql, QueryPart... parts)
ON
clause to the JOIN
.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
DSL.condition(String, QueryPart...)
@Support Table<Record> using(Field<?>... fields)
USING(column [, column...])
syntax.
If this is not supported by your RDBMS, then jOOQ will try to simulate this behaviour using the information provided in this query.
@Support Table<Record> using(java.util.Collection<? extends Field<?>> fields)
USING(column [, column...])
syntax.
If this is not supported by your RDBMS, then jOOQ will try to simulate this behaviour using the information provided in this query.
@Support TableOnConditionStep onKey() throws DataAccessException
See onKey(ForeignKey)
for examples.
DataAccessException
- If there is no non-ambiguous key definition
known to jOOQonKey(ForeignKey)
@Support TableOnConditionStep onKey(TableField<?,?>... keyFields) throws DataAccessException
See onKey(ForeignKey)
for examples.
DataAccessException
- If there is no non-ambiguous key definition
known to jOOQonKey(ForeignKey)
@Support TableOnConditionStep onKey(ForeignKey<?,?> key)
An example:
// There is a single foreign key relationship between A and B and it can
// be obtained by A.getReferencesTo(B) or vice versa. The order of A and
// B is not important
A.join(B).onKey();
// There are several foreign key relationships between A and B. In order
// to disambiguate, you can provide a formal org.jooq.Key reference from
// the generated Keys class
A.join(B).onKey(key);
// There are several foreign key relationships between A and B. In order
// to disambiguate, you can provide any non-ambiguous foreign key column
A.join(B).onKey(B.A_ID);
Copyright © 2014. All Rights Reserved.