diff --git a/jOOQ/src/main/java/org/jooq/SelectJoinStep.java b/jOOQ/src/main/java/org/jooq/SelectJoinStep.java index 624cbff8f9..0b6a2a979f 100644 --- a/jOOQ/src/main/java/org/jooq/SelectJoinStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectJoinStep.java @@ -894,6 +894,90 @@ public interface SelectJoinStep extends SelectWhereStep { @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) SelectJoinPartitionByStep rightOuterJoin(Name name); + /** + * Convenience method to FULL OUTER JOIN a table to the last + * table added to the FROM clause using + * {@link Table#fullOuterJoin(TableLike)}. + *

+ * A synonym for {@link #fullOuterJoin(TableLike)}. + */ + @Support({ FIREBIRD, HSQLDB, POSTGRES }) + SelectOnStep fullJoin(TableLike table); + + /** + * Convenience method to FULL OUTER JOIN a table to the last + * table added to the FROM clause using + * {@link Table#fullOuterJoin(String)}. + *

+ * A synonym for {@link #fullOuterJoin(SQL)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + SelectOnStep fullJoin(SQL sql); + + /** + * Convenience method to FULL OUTER JOIN a table to the last + * table added to the FROM clause using + * {@link Table#fullOuterJoin(String)}. + *

+ * A synonym for {@link #fullOuterJoin(String)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + SelectOnStep fullJoin(String sql); + + /** + * Convenience method to FULL OUTER JOIN a tableto the last + * table added to the FROM clause using + * {@link Table#fullOuterJoin(String, Object...)}. + *

+ * A synonym for {@link #fullOuterJoin(String, Object...)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + SelectOnStep fullJoin(String sql, Object... bindings); + + /** + * Convenience method to FULL OUTER JOIN a tableto the last + * table added to the FROM clause using + * {@link Table#fullOuterJoin(String, QueryPart...)}. + *

+ * A synonym for {@link #fullOuterJoin(String, QueryPart...)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + SelectOnStep fullJoin(String sql, QueryPart... parts); + + /** + * Convenience method to FULL OUTER JOIN a tableto the last + * table added to the FROM clause using + * {@link Table#fullOuterJoin(Name)}. + *

+ * A synonym for {@link #fullOuterJoin(Name)}. + */ + @Support({ FIREBIRD, HSQLDB, POSTGRES }) + SelectOnStep fullJoin(Name name); + /** * Convenience method to FULL OUTER JOIN a table to the last * table added to the FROM clause using diff --git a/jOOQ/src/main/java/org/jooq/Table.java b/jOOQ/src/main/java/org/jooq/Table.java index b63a25c7c8..44b872d5a9 100644 --- a/jOOQ/src/main/java/org/jooq/Table.java +++ b/jOOQ/src/main/java/org/jooq/Table.java @@ -1000,6 +1000,78 @@ public interface Table extends TableLike { @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) TablePartitionByStep rightOuterJoin(Name name); + /** + * FULL OUTER JOIN a table to this table. + *

+ * A synonym for {@link #fullOuterJoin(TableLike)}. + */ + @Support({ FIREBIRD, HSQLDB, POSTGRES }) + TableOnStep fullJoin(TableLike table); + + /** + * FULL OUTER JOIN a table to this table. + *

+ * A synonym for {@link #fullOuterJoin(SQL)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + TableOnStep fullJoin(SQL sql); + + /** + * FULL OUTER JOIN a table to this table. + *

+ * A synonym for {@link #fullOuterJoin(String)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + TableOnStep fullJoin(String sql); + + /** + * FULL OUTER JOIN a table to this table. + *

+ * A synonym for {@link #fullOuterJoin(String, Object...)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + TableOnStep fullJoin(String sql, Object... bindings); + + /** + * FULL OUTER JOIN a table to this table. + *

+ * A synonym for {@link #fullOuterJoin(String, QueryPart...)}. + *

+ * 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({ FIREBIRD, HSQLDB, POSTGRES }) + @PlainSQL + TableOnStep fullJoin(String sql, QueryPart... parts); + + /** + * FULL OUTER JOIN a table to this table. + *

+ * A synonym for {@link #fullOuterJoin(Name)}. + */ + @Support({ FIREBIRD, HSQLDB, POSTGRES }) + TableOnStep fullJoin(Name name); + /** * FULL OUTER JOIN a table to this table. *

diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractTable.java b/jOOQ/src/main/java/org/jooq/impl/AbstractTable.java index 7340a5683b..a36a854217 100644 --- a/jOOQ/src/main/java/org/jooq/impl/AbstractTable.java +++ b/jOOQ/src/main/java/org/jooq/impl/AbstractTable.java @@ -1001,6 +1001,36 @@ abstract class AbstractTable extends AbstractQueryPart impleme return fullOuterJoin(table(name)); } + @Override + public final TableOnStep fullJoin(TableLike table) { + return fullOuterJoin(table); + } + + @Override + public final TableOnStep fullJoin(SQL sql) { + return fullOuterJoin(sql); + } + + @Override + public final TableOnStep fullJoin(String sql) { + return fullOuterJoin(sql); + } + + @Override + public final TableOnStep fullJoin(String sql, Object... bindings) { + return fullOuterJoin(sql, bindings); + } + + @Override + public final TableOnStep fullJoin(String sql, QueryPart... parts) { + return fullOuterJoin(sql, parts); + } + + @Override + public final TableOnStep fullJoin(Name name) { + return fullOuterJoin(name); + } + @Override public final Table crossJoin(TableLike table) { return join(table, CROSS_JOIN); diff --git a/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java b/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java index e105127c38..26699a3be3 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java @@ -2193,6 +2193,11 @@ final class SelectImpl 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 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 fullOuterJoin(String sql) { + public final SelectImpl fullOuterJoin(String sql) { return fullOuterJoin(table(sql)); } @Override - public final SelectOnStep fullOuterJoin(String sql, Object... bindings) { + public final SelectImpl fullOuterJoin(String sql, Object... bindings) { return fullOuterJoin(table(sql, bindings)); } @Override - public final SelectOnStep fullOuterJoin(String sql, QueryPart... parts) { + public final SelectImpl fullOuterJoin(String sql, QueryPart... parts) { return fullOuterJoin(table(sql, parts)); }