org.jooq
Interface TableOnStep


public interface TableOnStep

An intermediate type for the construction of a 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)

Author:
Lukas Eder

Method Summary
 TableOnConditionStep on(Condition... conditions)
          Add an ON clause to the JOIN
 TableOnConditionStep on(String sql)
          Add an ON clause to the JOIN NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity.
 TableOnConditionStep on(String sql, Object... bindings)
          Add an ON clause to the JOIN NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity.
 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(Collection<? extends Field<?>> fields)
          Join the table with the USING(column [, column...])
 Table<Record> using(Field<?>... fields)
          Join the table with the USING(column [, column...])
 

Method Detail

on

TableOnConditionStep on(Condition... conditions)
Add an ON clause to the JOIN


on

TableOnConditionStep on(String sql)
Add an 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!

See Also:
Factory.condition(String)

on

TableOnConditionStep on(String sql,
                        Object... bindings)
Add an 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!

See Also:
Factory.condition(String, Object...)

using

Table<Record> using(Field<?>... fields)
Join the table with the 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.


using

Table<Record> using(Collection<? extends Field<?>> fields)
Join the table with the 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.


onKey

TableOnConditionStep onKey()
                           throws DataAccessException
Join the table on a non-ambiguous foreign key relationship between the two joined tables.

See onKey(ForeignKey) for examples.

Throws:
DataAccessException - If there is no non-ambiguous key definition known to jOOQ
See Also:
onKey(ForeignKey)

onKey

TableOnConditionStep onKey(TableField<?,?>... keyFields)
                           throws DataAccessException
Join the table on a non-ambiguous foreign key relationship between the two joined tables.

See onKey(ForeignKey) for examples.

Throws:
DataAccessException - If there is no non-ambiguous key definition known to jOOQ
See Also:
onKey(ForeignKey)

onKey

TableOnConditionStep onKey(ForeignKey<?,?> key)
Join the table on a non-ambiguous foreign key relationship between the two joined tables.

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 © 2012. All Rights Reserved.