public interface TableOnStep<R extends Record>
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<R> |
on(java.lang.Boolean condition)
Deprecated.
- 3.8.0 - [#4763] - Use
on(Condition...) or
on(Field) instead. Due to ambiguity between
calling this method using Field.equals(Object)
argument, vs. calling the other method via a
Field.equal(Object) argument, this method will be
removed in the future. |
TableOnConditionStep<R> |
on(Condition... conditions)
|
TableOnConditionStep<R> |
on(Field<java.lang.Boolean> condition)
Add an
ON clause to the JOIN . |
TableOnConditionStep<R> |
on(SQL sql)
Add an
ON clause to the JOIN . |
TableOnConditionStep<R> |
on(java.lang.String sql)
Add an
ON clause to the JOIN . |
TableOnConditionStep<R> |
on(java.lang.String sql,
java.lang.Object... bindings)
Add an
ON clause to the JOIN . |
TableOnConditionStep<R> |
on(java.lang.String sql,
QueryPart... parts)
Add an
ON clause to the JOIN . |
TableOnConditionStep<R> |
onKey()
Join the table on a non-ambiguous foreign key relationship between the
two joined tables.
|
TableOnConditionStep<R> |
onKey(ForeignKey<?,?> key)
Join the table on a non-ambiguous foreign key relationship between the
two joined tables.
|
TableOnConditionStep<R> |
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<R> on(Condition... conditions)
@Support TableOnConditionStep<R> on(Field<java.lang.Boolean> condition)
ON
clause to the JOIN
.@Deprecated @Support TableOnConditionStep<R> on(java.lang.Boolean condition)
on(Condition...)
or
on(Field)
instead. Due to ambiguity between
calling this method using Field.equals(Object)
argument, vs. calling the other method via a
Field.equal(Object)
argument, this method will be
removed in the future.ON
clause to the JOIN
.@Support @PlainSQL TableOnConditionStep<R> on(SQL 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(SQL)
,
SQL
@Support @PlainSQL TableOnConditionStep<R> 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)
,
SQL
@Support @PlainSQL TableOnConditionStep<R> 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!
@Support @PlainSQL TableOnConditionStep<R> 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!
@Support Table<Record> using(Field<?>... fields)
USING(column [, column...])
syntax.
If this is not supported by your RDBMS, then jOOQ will try to emulate 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 emulate this behaviour using the information provided in this query.
@Support TableOnConditionStep<R> onKey() throws DataAccessException
See onKey(ForeignKey)
for examples.
DataAccessException
- If there is no non-ambiguous key definition
known to jOOQonKey(ForeignKey)
@Support TableOnConditionStep<R> 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<R> 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 © 2018. All Rights Reserved.