[#5924] Add the Table.fullJoin() and SelectJoinStep.fullJoin() aliases

This commit is contained in:
lukaseder 2017-03-12 21:11:25 +01:00
parent 66edc06dc3
commit 190ec66b49
4 changed files with 220 additions and 4 deletions

View File

@ -894,6 +894,90 @@ public interface SelectJoinStep<R extends Record> extends SelectWhereStep<R> {
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
SelectJoinPartitionByStep<R> rightOuterJoin(Name name);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a table to the last
* table added to the <code>FROM</code> clause using
* {@link Table#fullOuterJoin(TableLike)}.
* <p>
* A synonym for {@link #fullOuterJoin(TableLike)}.
*/
@Support({ FIREBIRD, HSQLDB, POSTGRES })
SelectOnStep<R> fullJoin(TableLike<?> table);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a table to the last
* table added to the <code>FROM</code> clause using
* {@link Table#fullOuterJoin(String)}.
* <p>
* A synonym for {@link #fullOuterJoin(SQL)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
SelectOnStep<R> fullJoin(SQL sql);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a table to the last
* table added to the <code>FROM</code> clause using
* {@link Table#fullOuterJoin(String)}.
* <p>
* A synonym for {@link #fullOuterJoin(String)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
SelectOnStep<R> fullJoin(String sql);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a tableto the last
* table added to the <code>FROM</code> clause using
* {@link Table#fullOuterJoin(String, Object...)}.
* <p>
* A synonym for {@link #fullOuterJoin(String, Object...)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
SelectOnStep<R> fullJoin(String sql, Object... bindings);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a tableto the last
* table added to the <code>FROM</code> clause using
* {@link Table#fullOuterJoin(String, QueryPart...)}.
* <p>
* A synonym for {@link #fullOuterJoin(String, QueryPart...)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
SelectOnStep<R> fullJoin(String sql, QueryPart... parts);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a tableto the last
* table added to the <code>FROM</code> clause using
* {@link Table#fullOuterJoin(Name)}.
* <p>
* A synonym for {@link #fullOuterJoin(Name)}.
*/
@Support({ FIREBIRD, HSQLDB, POSTGRES })
SelectOnStep<R> fullJoin(Name name);
/**
* Convenience method to <code>FULL OUTER JOIN</code> a table to the last
* table added to the <code>FROM</code> clause using

View File

@ -1000,6 +1000,78 @@ public interface Table<R extends Record> extends TableLike<R> {
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES })
TablePartitionByStep<Record> rightOuterJoin(Name name);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>
* A synonym for {@link #fullOuterJoin(TableLike)}.
*/
@Support({ FIREBIRD, HSQLDB, POSTGRES })
TableOnStep<Record> fullJoin(TableLike<?> table);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>
* A synonym for {@link #fullOuterJoin(SQL)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
TableOnStep<Record> fullJoin(SQL sql);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>
* A synonym for {@link #fullOuterJoin(String)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
TableOnStep<Record> fullJoin(String sql);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>
* A synonym for {@link #fullOuterJoin(String, Object...)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
TableOnStep<Record> fullJoin(String sql, Object... bindings);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>
* A synonym for {@link #fullOuterJoin(String, QueryPart...)}.
* <p>
* <b>NOTE</b>: 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({ FIREBIRD, HSQLDB, POSTGRES })
@PlainSQL
TableOnStep<Record> fullJoin(String sql, QueryPart... parts);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>
* A synonym for {@link #fullOuterJoin(Name)}.
*/
@Support({ FIREBIRD, HSQLDB, POSTGRES })
TableOnStep<Record> fullJoin(Name name);
/**
* <code>FULL OUTER JOIN</code> a table to this table.
* <p>

View File

@ -1001,6 +1001,36 @@ abstract class AbstractTable<R extends Record> extends AbstractQueryPart impleme
return fullOuterJoin(table(name));
}
@Override
public final TableOnStep<Record> fullJoin(TableLike<?> table) {
return fullOuterJoin(table);
}
@Override
public final TableOnStep<Record> fullJoin(SQL sql) {
return fullOuterJoin(sql);
}
@Override
public final TableOnStep<Record> fullJoin(String sql) {
return fullOuterJoin(sql);
}
@Override
public final TableOnStep<Record> fullJoin(String sql, Object... bindings) {
return fullOuterJoin(sql, bindings);
}
@Override
public final TableOnStep<Record> fullJoin(String sql, QueryPart... parts) {
return fullOuterJoin(sql, parts);
}
@Override
public final TableOnStep<Record> fullJoin(Name name) {
return fullOuterJoin(name);
}
@Override
public final Table<Record> crossJoin(TableLike<?> table) {
return join(table, CROSS_JOIN);

View File

@ -2193,6 +2193,11 @@ final class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
return join(table, JoinType.RIGHT_OUTER_JOIN);
}
@Override
public final SelectOnStep<R> fullJoin(TableLike<?> table) {
return fullOuterJoin(table);
}
@Override
public final SelectImpl fullOuterJoin(TableLike<?> table) {
return join(table, JoinType.FULL_OUTER_JOIN);
@ -2423,22 +2428,47 @@ final class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
}
@Override
public final SelectOnStep<R> fullOuterJoin(SQL sql) {
public final SelectImpl fullJoin(SQL sql) {
return fullOuterJoin(sql);
}
@Override
public final SelectImpl fullJoin(String sql) {
return fullOuterJoin(sql);
}
@Override
public final SelectImpl fullJoin(String sql, Object... bindings) {
return fullOuterJoin(sql, bindings);
}
@Override
public final SelectImpl fullJoin(String sql, QueryPart... parts) {
return fullOuterJoin(sql, parts);
}
@Override
public final SelectImpl fullJoin(Name name) {
return fullOuterJoin(name);
}
@Override
public final SelectImpl fullOuterJoin(SQL sql) {
return fullOuterJoin(table(sql));
}
@Override
public final SelectOnStep<R> fullOuterJoin(String sql) {
public final SelectImpl fullOuterJoin(String sql) {
return fullOuterJoin(table(sql));
}
@Override
public final SelectOnStep<R> fullOuterJoin(String sql, Object... bindings) {
public final SelectImpl fullOuterJoin(String sql, Object... bindings) {
return fullOuterJoin(table(sql, bindings));
}
@Override
public final SelectOnStep<R> fullOuterJoin(String sql, QueryPart... parts) {
public final SelectImpl fullOuterJoin(String sql, QueryPart... parts) {
return fullOuterJoin(table(sql, parts));
}