diff --git a/jOOQ-release/build.xml b/jOOQ-release/build.xml index 215c354392..f7c951b9d0 100644 --- a/jOOQ-release/build.xml +++ b/jOOQ-release/build.xml @@ -1,36 +1,36 @@ - - - - + + + + - - + + - - - - - - - + + + + + + + - - + + - + - + @@ -38,12 +38,12 @@ - - + + - + @@ -51,7 +51,7 @@ - + @@ -59,8 +59,8 @@ - - + + @@ -69,61 +69,61 @@ - - - - - + + - - + + - - + + + + + - + - - - - - + + + + + - - - - + xxxx [/pro] --> \ No newline at end of file diff --git a/jOOQ/src/main/java/org/jooq/AggregateFilterStep.java b/jOOQ/src/main/java/org/jooq/AggregateFilterStep.java index a51779da43..28b2d9aa21 100644 --- a/jOOQ/src/main/java/org/jooq/AggregateFilterStep.java +++ b/jOOQ/src/main/java/org/jooq/AggregateFilterStep.java @@ -67,15 +67,19 @@ public interface AggregateFilterStep extends WindowBeforeOverStep { WindowBeforeOverStep filterWhere(Collection conditions); /** - * Add a FILTER clause to the aggregate function, connecting - * conditions with each other with {@link Operator#AND}. + * Add a FILTER clause to the aggregate function. */ @Support WindowBeforeOverStep filterWhere(Field field); /** - * Add a FILTER clause to the aggregate function, connecting - * conditions with each other with {@link Operator#AND}. + * Add a FILTER clause to the aggregate function. + */ + @Support + WindowBeforeOverStep filterWhere(Boolean field); + + /** + * Add a FILTER clause to the aggregate function. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of @@ -89,8 +93,7 @@ public interface AggregateFilterStep extends WindowBeforeOverStep { WindowBeforeOverStep filterWhere(String sql); /** - * Add a FILTER clause to the aggregate function, connecting - * conditions with each other with {@link Operator#AND}. + * Add a FILTER clause to the aggregate function. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of @@ -104,8 +107,7 @@ public interface AggregateFilterStep extends WindowBeforeOverStep { WindowBeforeOverStep filterWhere(String sql, Object... bindings); /** - * Add a FILTER clause to the aggregate function, connecting - * conditions with each other with {@link Operator#AND}. + * Add a FILTER clause to the aggregate function. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of diff --git a/jOOQ/src/main/java/org/jooq/Condition.java b/jOOQ/src/main/java/org/jooq/Condition.java index bc8decc1bb..e7a61d60e7 100644 --- a/jOOQ/src/main/java/org/jooq/Condition.java +++ b/jOOQ/src/main/java/org/jooq/Condition.java @@ -71,6 +71,16 @@ public interface Condition extends QueryPart { @Support Condition and(Field other); + /** + * Combine this condition with another one using the {@link Operator#AND} + * operator. + * + * @param other The other condition + * @return The combined condition + */ + @Support + Condition and(Boolean other); + /** * Combine this condition with another one using the {@link Operator#AND} * operator. @@ -146,6 +156,16 @@ public interface Condition extends QueryPart { @Support Condition andNot(Field other); + /** + * Combine this condition with a negated other one using the + * {@link Operator#AND} operator. + * + * @param other The other condition + * @return The combined condition + */ + @Support + Condition andNot(Boolean other); + /** * Combine this condition with an EXISTS clause using the * {@link Operator#AND} operator. @@ -186,6 +206,16 @@ public interface Condition extends QueryPart { @Support Condition or(Field other); + /** + * Combine this condition with another one using the {@link Operator#OR} + * operator. + * + * @param other The other condition + * @return The combined condition + */ + @Support + Condition or(Boolean other); + /** * Combine this condition with another one using the {@link Operator#OR} * operator. @@ -261,6 +291,16 @@ public interface Condition extends QueryPart { @Support Condition orNot(Field other); + /** + * Combine this condition with a negated other one using the + * {@link Operator#OR} operator. + * + * @param other The other condition + * @return The combined condition + */ + @Support + Condition orNot(Boolean other); + /** * Combine this condition with an EXISTS clause using the * {@link Operator#OR} operator. diff --git a/jOOQ/src/main/java/org/jooq/CreateTableAsStep.java b/jOOQ/src/main/java/org/jooq/CreateTableAsStep.java index 59a5ee61d8..f25f40b18c 100644 --- a/jOOQ/src/main/java/org/jooq/CreateTableAsStep.java +++ b/jOOQ/src/main/java/org/jooq/CreateTableAsStep.java @@ -53,6 +53,7 @@ import static org.jooq.SQLDialect.MARIADB; import static org.jooq.SQLDialect.MYSQL; // ... import static org.jooq.SQLDialect.POSTGRES; +// ... import static org.jooq.SQLDialect.SQLITE; // ... diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index adfce9d23b..2cde94ded1 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -55,6 +55,7 @@ import static org.jooq.SQLDialect.MARIADB; import static org.jooq.SQLDialect.MYSQL; // ... import static org.jooq.SQLDialect.POSTGRES; +// ... import static org.jooq.SQLDialect.SQLITE; // ... // ... diff --git a/jOOQ/src/main/java/org/jooq/DeleteConditionStep.java b/jOOQ/src/main/java/org/jooq/DeleteConditionStep.java index c9cbaa5e62..02134421a1 100644 --- a/jOOQ/src/main/java/org/jooq/DeleteConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/DeleteConditionStep.java @@ -72,6 +72,13 @@ public interface DeleteConditionStep extends DeleteFinalStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator + */ + @Support + DeleteConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator @@ -131,6 +138,13 @@ public interface DeleteConditionStep extends DeleteFinalStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator + */ + @Support + DeleteConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#AND} operator @@ -158,6 +172,13 @@ public interface DeleteConditionStep extends DeleteFinalStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator + */ + @Support + DeleteConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator @@ -217,6 +238,13 @@ public interface DeleteConditionStep extends DeleteFinalStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator + */ + @Support + DeleteConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#OR} operator diff --git a/jOOQ/src/main/java/org/jooq/DeleteWhereStep.java b/jOOQ/src/main/java/org/jooq/DeleteWhereStep.java index 749c16171e..81e245788f 100644 --- a/jOOQ/src/main/java/org/jooq/DeleteWhereStep.java +++ b/jOOQ/src/main/java/org/jooq/DeleteWhereStep.java @@ -79,6 +79,12 @@ public interface DeleteWhereStep extends DeleteFinalStep { @Support DeleteConditionStep where(Field condition); + /** + * Add conditions to the query. + */ + @Support + DeleteConditionStep where(Boolean condition); + /** * Add conditions to the query. *

diff --git a/jOOQ/src/main/java/org/jooq/DivideByOnConditionStep.java b/jOOQ/src/main/java/org/jooq/DivideByOnConditionStep.java index 549d1d2cf6..fe00738a36 100644 --- a/jOOQ/src/main/java/org/jooq/DivideByOnConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/DivideByOnConditionStep.java @@ -64,6 +64,13 @@ public interface DivideByOnConditionStep extends DivideByReturningStep { @Support DivideByOnConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator. + */ + @Support + DivideByOnConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator. @@ -123,6 +130,13 @@ public interface DivideByOnConditionStep extends DivideByReturningStep { @Support DivideByOnConditionStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator. + */ + @Support + DivideByOnConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS * clause using the {@link Operator#AND} operator. @@ -151,6 +165,13 @@ public interface DivideByOnConditionStep extends DivideByReturningStep { @Support DivideByOnConditionStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator. + */ + @Support + DivideByOnConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator. @@ -210,6 +231,13 @@ public interface DivideByOnConditionStep extends DivideByReturningStep { @Support DivideByOnConditionStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator. + */ + @Support + DivideByOnConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS * clause using the {@link Operator#OR} operator. diff --git a/jOOQ/src/main/java/org/jooq/DivideByOnStep.java b/jOOQ/src/main/java/org/jooq/DivideByOnStep.java index 7125a6f13a..b38932c08e 100644 --- a/jOOQ/src/main/java/org/jooq/DivideByOnStep.java +++ b/jOOQ/src/main/java/org/jooq/DivideByOnStep.java @@ -63,6 +63,12 @@ public interface DivideByOnStep { @Support DivideByOnConditionStep on(Field condition); + /** + * Add a division condition to the DIVIDE BY clause + */ + @Support + DivideByOnConditionStep on(Boolean condition); + /** * Add a division condition to the DIVIDE BY clause *

diff --git a/jOOQ/src/main/java/org/jooq/MergeMatchedDeleteStep.java b/jOOQ/src/main/java/org/jooq/MergeMatchedDeleteStep.java index 826c736478..cf106067fd 100644 --- a/jOOQ/src/main/java/org/jooq/MergeMatchedDeleteStep.java +++ b/jOOQ/src/main/java/org/jooq/MergeMatchedDeleteStep.java @@ -93,4 +93,19 @@ public interface MergeMatchedDeleteStep extends MergeNotMatche */ @Support({ CUBRID }) MergeNotMatchedStep deleteWhere(Field condition); + + /** + * Add an additional DELETE WHERE clause to the preceding + * WHEN MATCHED THEN UPDATE clause. + *

+ * Note: This syntax is only available for the + * {@link SQLDialect#CUBRID} and {@link SQLDialect#ORACLE} databases! + *

+ * See http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9016. + * htm for a full definition of the Oracle MERGE statement + */ + @Support({ CUBRID }) + MergeNotMatchedStep deleteWhere(Boolean condition); } diff --git a/jOOQ/src/main/java/org/jooq/MergeMatchedWhereStep.java b/jOOQ/src/main/java/org/jooq/MergeMatchedWhereStep.java index 823e9fc3e2..30362129d7 100644 --- a/jOOQ/src/main/java/org/jooq/MergeMatchedWhereStep.java +++ b/jOOQ/src/main/java/org/jooq/MergeMatchedWhereStep.java @@ -93,4 +93,19 @@ public interface MergeMatchedWhereStep extends MergeNotMatched */ @Support({ CUBRID }) MergeMatchedDeleteStep where(Field condition); + + /** + * Add an additional WHERE clause to the preceding + * WHEN MATCHED THEN UPDATE clause. + *

+ * Note: This syntax is only available for the + * {@link SQLDialect#CUBRID} and {@link SQLDialect#ORACLE} databases! + *

+ * See http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9016. + * htm for a full definition of the Oracle MERGE statement + */ + @Support({ CUBRID }) + MergeMatchedDeleteStep where(Boolean condition); } diff --git a/jOOQ/src/main/java/org/jooq/MergeNotMatchedWhereStep.java b/jOOQ/src/main/java/org/jooq/MergeNotMatchedWhereStep.java index 85d9b7e46e..34e66ce8ad 100644 --- a/jOOQ/src/main/java/org/jooq/MergeNotMatchedWhereStep.java +++ b/jOOQ/src/main/java/org/jooq/MergeNotMatchedWhereStep.java @@ -93,4 +93,19 @@ public interface MergeNotMatchedWhereStep extends MergeFinalSt */ @Support({ CUBRID }) MergeFinalStep where(Field condition); + + /** + * Add an additional WHERE clause to the preceding + * WHEN NOT MATCHED THEN INSERT clause. + *

+ * Note: This syntax is only available for the + * {@link SQLDialect#CUBRID} and {@link SQLDialect#ORACLE} databases! + *

+ * See http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9016. + * htm for a full definition of the Oracle MERGE statement + */ + @Support({ CUBRID }) + MergeFinalStep where(Boolean condition); } diff --git a/jOOQ/src/main/java/org/jooq/MergeOnConditionStep.java b/jOOQ/src/main/java/org/jooq/MergeOnConditionStep.java index 83bfe22fd8..e1d45db87d 100644 --- a/jOOQ/src/main/java/org/jooq/MergeOnConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/MergeOnConditionStep.java @@ -84,6 +84,13 @@ public interface MergeOnConditionStep extends MergeMatchedStep @Support({ CUBRID, HSQLDB }) MergeOnConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator and proceed to the next step. + */ + @Support({ CUBRID, HSQLDB }) + MergeOnConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator and proceed to the next step. @@ -143,6 +150,13 @@ public interface MergeOnConditionStep extends MergeMatchedStep @Support({ CUBRID, HSQLDB }) MergeOnConditionStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator and proceed to the next step. + */ + @Support({ CUBRID, HSQLDB }) + MergeOnConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#AND} operator and proceed to the next step. @@ -171,6 +185,13 @@ public interface MergeOnConditionStep extends MergeMatchedStep @Support({ CUBRID, HSQLDB }) MergeOnConditionStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator and proceed to the next step. + */ + @Support({ CUBRID, HSQLDB }) + MergeOnConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator and proceed to the next step. @@ -230,6 +251,13 @@ public interface MergeOnConditionStep extends MergeMatchedStep @Support({ CUBRID, HSQLDB }) MergeOnConditionStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator and proceed to the next step. + */ + @Support({ CUBRID, HSQLDB }) + MergeOnConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#OR} operator and proceed to the next step. diff --git a/jOOQ/src/main/java/org/jooq/MergeOnStep.java b/jOOQ/src/main/java/org/jooq/MergeOnStep.java index 77d483fdec..5e7c6e4c0c 100644 --- a/jOOQ/src/main/java/org/jooq/MergeOnStep.java +++ b/jOOQ/src/main/java/org/jooq/MergeOnStep.java @@ -83,6 +83,12 @@ public interface MergeOnStep { @Support({ CUBRID, HSQLDB }) MergeOnConditionStep on(Field condition); + /** + * Provide join conditions and proceed to the next step + */ + @Support({ CUBRID, HSQLDB }) + MergeOnConditionStep on(Boolean condition); + /** * Provide join conditions and proceed to the next step *

diff --git a/jOOQ/src/main/java/org/jooq/OrderedAggregateFunction.java b/jOOQ/src/main/java/org/jooq/OrderedAggregateFunction.java index c5d4daf2e2..75ed066030 100644 --- a/jOOQ/src/main/java/org/jooq/OrderedAggregateFunction.java +++ b/jOOQ/src/main/java/org/jooq/OrderedAggregateFunction.java @@ -50,6 +50,7 @@ import static org.jooq.SQLDialect.MYSQL; // ... import static org.jooq.SQLDialect.POSTGRES; // ... +// ... import java.util.Collection; diff --git a/jOOQ/src/main/java/org/jooq/SelectConditionStep.java b/jOOQ/src/main/java/org/jooq/SelectConditionStep.java index d846511c84..4fdcd4d2b2 100644 --- a/jOOQ/src/main/java/org/jooq/SelectConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectConditionStep.java @@ -101,6 +101,13 @@ public interface SelectConditionStep extends SelectConnectBySt @Support SelectConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator and proceed to the next step. + */ + @Support + SelectConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator and proceed to the next step. @@ -160,6 +167,13 @@ public interface SelectConditionStep extends SelectConnectBySt @Support SelectConditionStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator and proceed to the next step. + */ + @Support + SelectConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#AND} operator and proceed to the next step. @@ -188,6 +202,13 @@ public interface SelectConditionStep extends SelectConnectBySt @Support SelectConditionStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator and proceed to the next step. + */ + @Support + SelectConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator and proceed to the next step. @@ -247,6 +268,13 @@ public interface SelectConditionStep extends SelectConnectBySt @Support SelectConditionStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator and proceed to the next step. + */ + @Support + SelectConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#OR} operator and proceed to the next step. diff --git a/jOOQ/src/main/java/org/jooq/SelectConnectByConditionStep.java b/jOOQ/src/main/java/org/jooq/SelectConnectByConditionStep.java index b3c423910f..caac4953b8 100644 --- a/jOOQ/src/main/java/org/jooq/SelectConnectByConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectConnectByConditionStep.java @@ -103,6 +103,13 @@ public interface SelectConnectByConditionStep extends SelectSt @Support({ CUBRID }) SelectConnectByConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator and proceed to the next step. + */ + @Support({ CUBRID }) + SelectConnectByConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator and proceed to the next step. diff --git a/jOOQ/src/main/java/org/jooq/SelectConnectByStep.java b/jOOQ/src/main/java/org/jooq/SelectConnectByStep.java index 75178370c7..d73536f12d 100644 --- a/jOOQ/src/main/java/org/jooq/SelectConnectByStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectConnectByStep.java @@ -102,6 +102,12 @@ public interface SelectConnectByStep extends SelectGroupByStep @Support({ CUBRID }) SelectConnectByConditionStep connectBy(Field condition); + /** + * Add an Oracle-specific CONNECT BY clause to the query + */ + @Support({ CUBRID }) + SelectConnectByConditionStep connectBy(Boolean condition); + /** * Add an Oracle-specific CONNECT BY clause to the query *

@@ -158,6 +164,13 @@ public interface SelectConnectByStep extends SelectGroupByStep @Support({ CUBRID }) SelectConnectByConditionStep connectByNoCycle(Field condition); + /** + * Add an Oracle-specific CONNECT BY NOCYCLE clause to the + * query + */ + @Support({ CUBRID }) + SelectConnectByConditionStep connectByNoCycle(Boolean condition); + /** * Add an Oracle-specific CONNECT BY NOCYCLE clause to the * query diff --git a/jOOQ/src/main/java/org/jooq/SelectHavingConditionStep.java b/jOOQ/src/main/java/org/jooq/SelectHavingConditionStep.java index 5ec80cffac..1f64f08077 100644 --- a/jOOQ/src/main/java/org/jooq/SelectHavingConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectHavingConditionStep.java @@ -101,6 +101,13 @@ public interface SelectHavingConditionStep extends SelectWindo @Support SelectHavingConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator and proceed to the next step. + */ + @Support + SelectHavingConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator and proceed to the next step. @@ -160,6 +167,13 @@ public interface SelectHavingConditionStep extends SelectWindo @Support SelectHavingConditionStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator and proceed to the next step. + */ + @Support + SelectHavingConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#AND} operator and proceed to the next step. @@ -188,6 +202,13 @@ public interface SelectHavingConditionStep extends SelectWindo @Support SelectHavingConditionStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator and proceed to the next step. + */ + @Support + SelectHavingConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator and proceed to the next step. @@ -247,6 +268,13 @@ public interface SelectHavingConditionStep extends SelectWindo @Support SelectHavingConditionStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator and proceed to the next step. + */ + @Support + SelectHavingConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#OR} operator and proceed to the next step. diff --git a/jOOQ/src/main/java/org/jooq/SelectHavingStep.java b/jOOQ/src/main/java/org/jooq/SelectHavingStep.java index 73a9e4f3d7..352750cfe8 100644 --- a/jOOQ/src/main/java/org/jooq/SelectHavingStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectHavingStep.java @@ -108,6 +108,12 @@ public interface SelectHavingStep extends SelectWindowStep @Support SelectHavingConditionStep having(Field condition); + /** + * Add a HAVING clause to the query. + */ + @Support + SelectHavingConditionStep having(Boolean condition); + /** * Add a HAVING clause to the query. *

diff --git a/jOOQ/src/main/java/org/jooq/SelectOnConditionStep.java b/jOOQ/src/main/java/org/jooq/SelectOnConditionStep.java index 4e89ba08bb..bc9b81204f 100644 --- a/jOOQ/src/main/java/org/jooq/SelectOnConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectOnConditionStep.java @@ -101,6 +101,13 @@ public interface SelectOnConditionStep extends SelectJoinStep< @Support SelectOnConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator and proceed to the next step. + */ + @Support + SelectOnConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator and proceed to the next step. @@ -160,6 +167,13 @@ public interface SelectOnConditionStep extends SelectJoinStep< @Support SelectOnConditionStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator and proceed to the next step. + */ + @Support + SelectOnConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#AND} operator and proceed to the next step. @@ -188,6 +202,13 @@ public interface SelectOnConditionStep extends SelectJoinStep< @Support SelectOnConditionStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator and proceed to the next step. + */ + @Support + SelectOnConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator and proceed to the next step. @@ -247,6 +268,13 @@ public interface SelectOnConditionStep extends SelectJoinStep< @Support SelectOnConditionStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator and proceed to the next step. + */ + @Support + SelectOnConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#OR} operator and proceed to the next step. diff --git a/jOOQ/src/main/java/org/jooq/SelectOnStep.java b/jOOQ/src/main/java/org/jooq/SelectOnStep.java index 67ff45ce80..3535188e6d 100644 --- a/jOOQ/src/main/java/org/jooq/SelectOnStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectOnStep.java @@ -102,6 +102,12 @@ public interface SelectOnStep { @Support SelectOnConditionStep on(Field condition); + /** + * Add an ON clause to the previous JOIN. + */ + @Support + SelectOnConditionStep on(Boolean condition); + /** * Add an ON clause to the previous JOIN. *

diff --git a/jOOQ/src/main/java/org/jooq/SelectStartWithStep.java b/jOOQ/src/main/java/org/jooq/SelectStartWithStep.java index d6d8f69558..8a60fa564c 100644 --- a/jOOQ/src/main/java/org/jooq/SelectStartWithStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectStartWithStep.java @@ -104,6 +104,13 @@ public interface SelectStartWithStep extends SelectGroupByStep @Support({ CUBRID }) SelectGroupByStep startWith(Field condition); + /** + * Add an Oracle-specific START WITH clause to the query's + * CONNECT BY clause. + */ + @Support({ CUBRID }) + SelectGroupByStep startWith(Boolean condition); + /** * Add an Oracle-specific START WITH clause to the query's * CONNECT BY clause. diff --git a/jOOQ/src/main/java/org/jooq/SelectWhereStep.java b/jOOQ/src/main/java/org/jooq/SelectWhereStep.java index a7e4d064c9..5489e24c6f 100644 --- a/jOOQ/src/main/java/org/jooq/SelectWhereStep.java +++ b/jOOQ/src/main/java/org/jooq/SelectWhereStep.java @@ -108,6 +108,12 @@ public interface SelectWhereStep extends SelectConnectByStep where(Field field); + /** + * Add a WHERE clause to the query. + */ + @Support + SelectConditionStep where(Boolean field); + /** * Add a WHERE clause to the query. *

diff --git a/jOOQ/src/main/java/org/jooq/TableOnConditionStep.java b/jOOQ/src/main/java/org/jooq/TableOnConditionStep.java index 8ee90e9cc8..1d5dcbb346 100644 --- a/jOOQ/src/main/java/org/jooq/TableOnConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/TableOnConditionStep.java @@ -67,6 +67,13 @@ public interface TableOnConditionStep extends Table { @Support TableOnConditionStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator. + */ + @Support + TableOnConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator. @@ -126,6 +133,13 @@ public interface TableOnConditionStep extends Table { @Support TableOnConditionStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator. + */ + @Support + TableOnConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS * clause using the {@link Operator#AND} operator. @@ -154,6 +168,13 @@ public interface TableOnConditionStep extends Table { @Support TableOnConditionStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator. + */ + @Support + TableOnConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator. @@ -213,6 +234,13 @@ public interface TableOnConditionStep extends Table { @Support TableOnConditionStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator. + */ + @Support + TableOnConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS * clause using the {@link Operator#OR} operator. diff --git a/jOOQ/src/main/java/org/jooq/TableOnStep.java b/jOOQ/src/main/java/org/jooq/TableOnStep.java index 0ed735103a..d02e7c63d8 100644 --- a/jOOQ/src/main/java/org/jooq/TableOnStep.java +++ b/jOOQ/src/main/java/org/jooq/TableOnStep.java @@ -68,6 +68,12 @@ public interface TableOnStep { @Support TableOnConditionStep on(Field condition); + /** + * Add an ON clause to the JOIN. + */ + @Support + TableOnConditionStep on(Boolean condition); + /** * Add an ON clause to the JOIN. *

diff --git a/jOOQ/src/main/java/org/jooq/UpdateConditionStep.java b/jOOQ/src/main/java/org/jooq/UpdateConditionStep.java index 57b2a2c992..5c0c1dce57 100644 --- a/jOOQ/src/main/java/org/jooq/UpdateConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/UpdateConditionStep.java @@ -74,6 +74,13 @@ public interface UpdateConditionStep extends UpdateFinalStep and(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#AND} operator + */ + @Support + UpdateConditionStep and(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#AND} operator @@ -133,6 +140,13 @@ public interface UpdateConditionStep extends UpdateFinalStep andNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#AND} operator + */ + @Support + UpdateConditionStep andNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#AND} operator @@ -161,6 +175,13 @@ public interface UpdateConditionStep extends UpdateFinalStep or(Field condition); + /** + * Combine the currently assembled conditions with another one using the + * {@link Operator#OR} operator + */ + @Support + UpdateConditionStep or(Boolean condition); + /** * Combine the currently assembled conditions with another one using the * {@link Operator#OR} operator @@ -220,6 +241,13 @@ public interface UpdateConditionStep extends UpdateFinalStep orNot(Field condition); + /** + * Combine the currently assembled conditions with a negated other one using + * the {@link Operator#OR} operator + */ + @Support + UpdateConditionStep orNot(Boolean condition); + /** * Combine the currently assembled conditions with an EXISTS clause using * the {@link Operator#OR} operator diff --git a/jOOQ/src/main/java/org/jooq/UpdateWhereStep.java b/jOOQ/src/main/java/org/jooq/UpdateWhereStep.java index be65cf7277..66bcc14a26 100644 --- a/jOOQ/src/main/java/org/jooq/UpdateWhereStep.java +++ b/jOOQ/src/main/java/org/jooq/UpdateWhereStep.java @@ -81,6 +81,12 @@ public interface UpdateWhereStep extends UpdateFinalStep, U @Support UpdateConditionStep where(Field condition); + /** + * Add conditions to the query + */ + @Support + UpdateConditionStep where(Boolean condition); + /** * Add conditions to the query *

diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractCondition.java b/jOOQ/src/main/java/org/jooq/impl/AbstractCondition.java index 8818d083b2..0692793e6d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/AbstractCondition.java +++ b/jOOQ/src/main/java/org/jooq/impl/AbstractCondition.java @@ -84,6 +84,11 @@ abstract class AbstractCondition extends AbstractQueryPart implements Condition return and(condition(other)); } + @Override + public Condition and(Boolean other) { + return and(condition(other)); + } + @Override public final Condition or(Condition other) { return DSL.or(this, other); @@ -94,6 +99,11 @@ abstract class AbstractCondition extends AbstractQueryPart implements Condition return or(condition(other)); } + @Override + public final Condition or(Boolean other) { + return or(condition(other)); + } + @Override public final Condition and(String sql) { return and(condition(sql)); @@ -134,6 +144,11 @@ abstract class AbstractCondition extends AbstractQueryPart implements Condition return andNot(condition(other)); } + @Override + public final Condition andNot(Boolean other) { + return andNot(condition(other)); + } + @Override public final Condition orNot(Condition other) { return or(other.not()); @@ -144,6 +159,11 @@ abstract class AbstractCondition extends AbstractQueryPart implements Condition return orNot(condition(other)); } + @Override + public final Condition orNot(Boolean other) { + return orNot(condition(other)); + } + @Override public final Condition andExists(Select select) { return and(exists(select)); diff --git a/jOOQ/src/main/java/org/jooq/impl/ConditionProviderImpl.java b/jOOQ/src/main/java/org/jooq/impl/ConditionProviderImpl.java index a49133e1f7..efde2c61f1 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ConditionProviderImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ConditionProviderImpl.java @@ -140,6 +140,11 @@ class ConditionProviderImpl extends AbstractQueryPart implements ConditionProvid return getWhere().and(other); } + @Override + public final Condition and(Boolean other) { + return getWhere().and(other); + } + @Override public final Condition and(String sql) { return getWhere().and(sql); @@ -165,6 +170,11 @@ class ConditionProviderImpl extends AbstractQueryPart implements ConditionProvid return getWhere().andNot(other); } + @Override + public final Condition andNot(Boolean other) { + return getWhere().andNot(other); + } + @Override public final Condition andExists(Select select) { return getWhere().andExists(select); @@ -185,6 +195,11 @@ class ConditionProviderImpl extends AbstractQueryPart implements ConditionProvid return getWhere().or(other); } + @Override + public final Condition or(Boolean other) { + return getWhere().or(other); + } + @Override public final Condition or(String sql) { return getWhere().or(sql); @@ -210,6 +225,11 @@ class ConditionProviderImpl extends AbstractQueryPart implements ConditionProvid return getWhere().orNot(other); } + @Override + public final Condition orNot(Boolean other) { + return getWhere().orNot(other); + } + @Override public final Condition orExists(Select select) { return getWhere().orExists(select); diff --git a/jOOQ/src/main/java/org/jooq/impl/CreateTableImpl.java b/jOOQ/src/main/java/org/jooq/impl/CreateTableImpl.java index 96c1f68321..37de1b5720 100644 --- a/jOOQ/src/main/java/org/jooq/impl/CreateTableImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/CreateTableImpl.java @@ -52,6 +52,7 @@ import static org.jooq.SQLDialect.FIREBIRD; // ... import static org.jooq.SQLDialect.POSTGRES; // ... +// ... import static org.jooq.impl.DSL.field; import static org.jooq.impl.DSL.name; import static org.jooq.impl.Utils.DATA_SELECT_INTO_TABLE; @@ -245,7 +246,7 @@ class CreateTableImpl extends AbstractQuery implements .sql(' '); if (temporary) - if (ctx.family() == POSTGRES) + if (asList(POSTGRES).contains(ctx.family())) ctx.keyword("temporary").sql(' '); else ctx.keyword("global temporary").sql(' '); diff --git a/jOOQ/src/main/java/org/jooq/impl/CurrentUser.java b/jOOQ/src/main/java/org/jooq/impl/CurrentUser.java index f4d22db767..035ff4e5ab 100644 --- a/jOOQ/src/main/java/org/jooq/impl/CurrentUser.java +++ b/jOOQ/src/main/java/org/jooq/impl/CurrentUser.java @@ -75,6 +75,7 @@ class CurrentUser extends AbstractFunction { xxxx xxxx xxxx xxxxx xxxx xxxxxxx + xxxx xxxxxxxxx xxxx xxxxxxxxxx xxxx xxxxxxx xx [/pro] */ diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index 1e3bd4e901..030c7ab0e1 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -3476,7 +3476,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep1 mergeInto(Table table, Field field1) { - return using(new DefaultConfiguration()).mergeInto(table, field1); + return using(new DefaultConfiguration()).mergeInto(table, field1); } /** @@ -3508,7 +3508,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep2 mergeInto(Table table, Field field1, Field field2) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2); } /** @@ -3540,7 +3540,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep3 mergeInto(Table table, Field field1, Field field2, Field field3) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3); } /** @@ -3572,7 +3572,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep4 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4); } /** @@ -3604,7 +3604,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep5 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5); } /** @@ -3636,7 +3636,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep6 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6); } /** @@ -3668,7 +3668,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep7 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7); } /** @@ -3700,7 +3700,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep8 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8); } /** @@ -3732,7 +3732,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep9 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9); } /** @@ -3764,7 +3764,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep10 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10); } /** @@ -3796,7 +3796,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep11 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11); } /** @@ -3828,7 +3828,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep12 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12); } /** @@ -3860,7 +3860,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep13 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13); } /** @@ -3892,7 +3892,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep14 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14); } /** @@ -3924,7 +3924,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep15 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15); } /** @@ -3956,7 +3956,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep16 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16); } /** @@ -3988,7 +3988,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep17 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17); } /** @@ -4020,7 +4020,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep18 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18); } /** @@ -4052,7 +4052,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep19 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19); } /** @@ -4084,7 +4084,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep20 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20); } /** @@ -4116,7 +4116,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep21 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21); } /** @@ -4148,7 +4148,7 @@ public class DSL { @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep22 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22) { - return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22); + return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22); } // [jooq-tools] END [merge] @@ -11506,6 +11506,10 @@ public class DSL { * The * percentile_cont([number]) within group (order by [column]) * function. + *

+ * While {@link SQLDialect#ORACLE} and {@link SQLDialect#POSTGRES} support + * this as an aggregate function, {@link SQLDialect#SQLSERVER} and + * {@link SQLDialect#REDSHIFT} support only its window function variant. */ @Support({ POSTGRES_9_4 }) public static OrderedAggregateFunction percentileCont(Number number) { @@ -11516,6 +11520,10 @@ public class DSL { * The * percentile_cont([number]) within group (order by [column]) * function. + *

+ * While {@link SQLDialect#ORACLE} and {@link SQLDialect#POSTGRES} support + * this as an aggregate function, {@link SQLDialect#SQLSERVER} and + * {@link SQLDialect#REDSHIFT} support only its window function variant. */ @Support({ POSTGRES_9_4 }) public static OrderedAggregateFunction percentileCont(Field field) { @@ -11526,6 +11534,10 @@ public class DSL { * The * percentile_disc([number]) within group (order by [column]) * function. + *

+ * While {@link SQLDialect#ORACLE} and {@link SQLDialect#POSTGRES} support + * this as an aggregate function, {@link SQLDialect#SQLSERVER} and + * {@link SQLDialect#REDSHIFT} support only its window function variant. */ @Support({ POSTGRES_9_4 }) public static OrderedAggregateFunction percentileDisc(Number number) { @@ -11536,6 +11548,10 @@ public class DSL { * The * percentile_disc([number]) within group (order by [column]) * function. + *

+ * While {@link SQLDialect#ORACLE} and {@link SQLDialect#POSTGRES} support + * this as an aggregate function, {@link SQLDialect#SQLSERVER} and + * {@link SQLDialect#REDSHIFT} support only its window function variant. */ @Support({ POSTGRES_9_4 }) public static OrderedAggregateFunction percentileDisc(Field field) { diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java b/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java index 3fda474f07..d1819c01f7 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java @@ -57,6 +57,7 @@ import static org.jooq.SQLDialect.MARIADB; import static org.jooq.SQLDialect.MYSQL; // ... import static org.jooq.SQLDialect.POSTGRES; +// ... import static org.jooq.SQLDialect.SQLITE; // ... // ... @@ -367,7 +368,7 @@ public class DefaultBinding implements Binding { // above case where the type is OTHER // [#1125] Also with temporal data types, casting is needed some times // [#1130] TODO type can be null for ARRAY types, etc. - else if (family == POSTGRES && (sqlDataType == null || !sqlDataType.isTemporal())) { + else if (asList(POSTGRES).contains(family) && (sqlDataType == null || !sqlDataType.isTemporal())) { toSQL(ctx, converted); } diff --git a/jOOQ/src/main/java/org/jooq/impl/DeleteImpl.java b/jOOQ/src/main/java/org/jooq/impl/DeleteImpl.java index 4c614fa797..36c1728370 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DeleteImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/DeleteImpl.java @@ -98,6 +98,11 @@ class DeleteImpl return where(condition(condition)); } + @Override + public final DeleteImpl where(Boolean condition) { + return where(condition(condition)); + } + @Override public final DeleteImpl where(String sql) { return where(condition(sql)); @@ -134,6 +139,11 @@ class DeleteImpl return and(condition(condition)); } + @Override + public final DeleteImpl and(Boolean condition) { + return and(condition(condition)); + } + @Override public final DeleteImpl and(String sql) { return and(condition(sql)); @@ -159,6 +169,11 @@ class DeleteImpl return andNot(condition(condition)); } + @Override + public final DeleteImpl andNot(Boolean condition) { + return andNot(condition(condition)); + } + @Override public final DeleteImpl andExists(Select select) { return and(exists(select)); @@ -180,6 +195,11 @@ class DeleteImpl return or(condition(condition)); } + @Override + public final DeleteImpl or(Boolean condition) { + return or(condition(condition)); + } + @Override public final DeleteImpl or(String sql) { return or(condition(sql)); @@ -205,6 +225,11 @@ class DeleteImpl return orNot(condition(condition)); } + @Override + public final DeleteImpl orNot(Boolean condition) { + return orNot(condition(condition)); + } + @Override public final DeleteImpl orExists(Select select) { return or(exists(select)); diff --git a/jOOQ/src/main/java/org/jooq/impl/DivideBy.java b/jOOQ/src/main/java/org/jooq/impl/DivideBy.java index 96220b7c7b..8f6345470d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DivideBy.java +++ b/jOOQ/src/main/java/org/jooq/impl/DivideBy.java @@ -164,6 +164,11 @@ implements return on(condition(c)); } + @Override + public final DivideByOnConditionStep on(Boolean c) { + return on(condition(c)); + } + @Override public final DivideByOnConditionStep on(String sql) { and(sql); @@ -204,6 +209,11 @@ implements return and(condition(c)); } + @Override + public final DivideByOnConditionStep and(Boolean c) { + return and(condition(c)); + } + @Override public final DivideByOnConditionStep and(String sql) { return and(condition(sql)); @@ -229,6 +239,11 @@ implements return andNot(condition(c)); } + @Override + public final DivideByOnConditionStep andNot(Boolean c) { + return andNot(condition(c)); + } + @Override public final DivideByOnConditionStep andExists(Select select) { return and(exists(select)); @@ -250,6 +265,11 @@ implements return or(condition(c)); } + @Override + public final DivideByOnConditionStep or(Boolean c) { + return or(condition(c)); + } + @Override public final DivideByOnConditionStep or(String sql) { return or(condition(sql)); @@ -275,6 +295,11 @@ implements return orNot(condition(c)); } + @Override + public final DivideByOnConditionStep orNot(Boolean c) { + return orNot(condition(c)); + } + @Override public final DivideByOnConditionStep orExists(Select select) { return or(exists(select)); diff --git a/jOOQ/src/main/java/org/jooq/impl/Function.java b/jOOQ/src/main/java/org/jooq/impl/Function.java index 7ff4398b25..bfe89ceacd 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Function.java +++ b/jOOQ/src/main/java/org/jooq/impl/Function.java @@ -602,6 +602,11 @@ class Function extends AbstractField implements return filterWhere(condition(field)); } + @Override + public final WindowBeforeOverStep filterWhere(Boolean field) { + return filterWhere(condition(field)); + } + @Override public final WindowBeforeOverStep filterWhere(String sql) { return filterWhere(condition(sql)); diff --git a/jOOQ/src/main/java/org/jooq/impl/GroupConcat.java b/jOOQ/src/main/java/org/jooq/impl/GroupConcat.java index 12f840ed2a..1f87ccfb97 100644 --- a/jOOQ/src/main/java/org/jooq/impl/GroupConcat.java +++ b/jOOQ/src/main/java/org/jooq/impl/GroupConcat.java @@ -146,7 +146,12 @@ class GroupConcat extends AbstractFunction implements GroupConcatOrderBy } @Override - public final AggregateFilterStep filterWhere(Field field) { + public final AggregateFilterStep filterWhere(Field c) { + throw new UnsupportedOperationException("FILTER() not supported on GROUP_CONCAT aggregate function"); + } + + @Override + public final AggregateFilterStep filterWhere(Boolean c) { throw new UnsupportedOperationException("FILTER() not supported on GROUP_CONCAT aggregate function"); } diff --git a/jOOQ/src/main/java/org/jooq/impl/Identifiers.java b/jOOQ/src/main/java/org/jooq/impl/Identifiers.java index a80991b751..28cad00802 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Identifiers.java +++ b/jOOQ/src/main/java/org/jooq/impl/Identifiers.java @@ -104,6 +104,7 @@ class Identifiers { xxxx xxxxxxxxx xxxx xxxxxxx xxxx xxxxxxx + xxxx xxxxxxxxx xx [/pro] */ case CUBRID: case DERBY: diff --git a/jOOQ/src/main/java/org/jooq/impl/JoinTable.java b/jOOQ/src/main/java/org/jooq/impl/JoinTable.java index 948c54b2fc..1700a488f5 100644 --- a/jOOQ/src/main/java/org/jooq/impl/JoinTable.java +++ b/jOOQ/src/main/java/org/jooq/impl/JoinTable.java @@ -428,6 +428,11 @@ class JoinTable extends AbstractTable implements TableOptionalOnStep, Ta return on(condition(c)); } + @Override + public final JoinTable on(Boolean c) { + return on(condition(c)); + } + @Override public final JoinTable on(String sql) { and(sql); @@ -528,6 +533,11 @@ class JoinTable extends AbstractTable implements TableOptionalOnStep, Ta return and(condition(c)); } + @Override + public final JoinTable and(Boolean c) { + return and(condition(c)); + } + @Override public final JoinTable and(String sql) { return and(condition(sql)); @@ -553,6 +563,11 @@ class JoinTable extends AbstractTable implements TableOptionalOnStep, Ta return andNot(condition(c)); } + @Override + public final JoinTable andNot(Boolean c) { + return andNot(condition(c)); + } + @Override public final JoinTable andExists(Select select) { return and(exists(select)); @@ -574,6 +589,11 @@ class JoinTable extends AbstractTable implements TableOptionalOnStep, Ta return or(condition(c)); } + @Override + public final JoinTable or(Boolean c) { + return or(condition(c)); + } + @Override public final JoinTable or(String sql) { return or(condition(sql)); @@ -599,6 +619,11 @@ class JoinTable extends AbstractTable implements TableOptionalOnStep, Ta return orNot(condition(c)); } + @Override + public final JoinTable orNot(Boolean c) { + return orNot(condition(c)); + } + @Override public final JoinTable orExists(Select select) { return or(exists(select)); diff --git a/jOOQ/src/main/java/org/jooq/impl/MergeImpl.java b/jOOQ/src/main/java/org/jooq/impl/MergeImpl.java index a5d2b6d077..e7766d5a70 100644 --- a/jOOQ/src/main/java/org/jooq/impl/MergeImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/MergeImpl.java @@ -585,6 +585,11 @@ implements return on(condition(condition)); } + @Override + public final MergeOnConditionStep on(Boolean condition) { + return on(condition(condition)); + } + @Override public final MergeImpl on(String sql) { return on(condition(sql)); @@ -611,6 +616,11 @@ implements return and(condition(condition)); } + @Override + public final MergeImpl and(Boolean condition) { + return and(condition(condition)); + } + @Override public final MergeImpl and(String sql) { return and(condition(sql)); @@ -636,6 +646,11 @@ implements return and(condition(condition)); } + @Override + public final MergeImpl andNot(Boolean condition) { + return andNot(condition(condition)); + } + @Override public final MergeImpl andExists(Select select) { return and(exists(select)); @@ -657,6 +672,11 @@ implements return and(condition(condition)); } + @Override + public final MergeImpl or(Boolean condition) { + return and(condition(condition)); + } + @Override public final MergeImpl or(String sql) { return or(condition(sql)); @@ -682,6 +702,11 @@ implements return and(condition(condition)); } + @Override + public final MergeImpl orNot(Boolean condition) { + return orNot(condition(condition)); + } + @Override public final MergeImpl orExists(Select select) { return or(exists(select)); @@ -923,6 +948,11 @@ implements return where(condition(condition)); } + @Override + public final MergeMatchedDeleteStep where(Boolean condition) { + return where(condition(condition)); + } + @Override public final MergeImpl deleteWhere(Condition condition) { matchedDeleteWhere = condition; @@ -934,6 +964,11 @@ implements return deleteWhere(condition(condition)); } + @Override + public final MergeImpl deleteWhere(Boolean condition) { + return deleteWhere(condition(condition)); + } + // ------------------------------------------------------------------------- // QueryPart API // ------------------------------------------------------------------------- diff --git a/jOOQ/src/main/java/org/jooq/impl/Replace.java b/jOOQ/src/main/java/org/jooq/impl/Replace.java index 6ab4a349d5..d4523d54e0 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Replace.java +++ b/jOOQ/src/main/java/org/jooq/impl/Replace.java @@ -81,6 +81,7 @@ class Replace extends AbstractFunction { xxxx xxxx xxxx xxxxx xxxx xxxxxxx + xxxx xxxxxxxxx xxxx xxxxxxxxxx xxxx xxxxxxx xxxx xxxxxxxx diff --git a/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java b/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java index 77ad46fbf1..fb0b11e434 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/SelectImpl.java @@ -338,6 +338,11 @@ class SelectImpl select) { return and(exists(select)); @@ -449,6 +464,11 @@ class SelectImpl select) { return or(exists(select)); @@ -496,6 +521,11 @@ class SelectImpl fetchLazy() { return getDelegate().fetchLazy(); diff --git a/jOOQ/src/main/java/org/jooq/impl/UpdateImpl.java b/jOOQ/src/main/java/org/jooq/impl/UpdateImpl.java index 9e5c0505fe..98628f3626 100644 --- a/jOOQ/src/main/java/org/jooq/impl/UpdateImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/UpdateImpl.java @@ -527,6 +527,11 @@ final class UpdateImpl return where(condition(condition)); } + @Override + public final UpdateImpl where(Boolean condition) { + return where(condition(condition)); + } + @Override public final UpdateImpl where(String sql) { return where(condition(sql)); @@ -563,6 +568,11 @@ final class UpdateImpl return and(condition(condition)); } + @Override + public final UpdateImpl and(Boolean condition) { + return and(condition(condition)); + } + @Override public final UpdateImpl and(String sql) { return and(condition(sql)); @@ -588,6 +598,11 @@ final class UpdateImpl return andNot(condition(condition)); } + @Override + public final UpdateImpl andNot(Boolean condition) { + return andNot(condition(condition)); + } + @Override public final UpdateImpl andExists(Select select) { return and(exists(select)); @@ -609,6 +624,11 @@ final class UpdateImpl return or(condition(condition)); } + @Override + public final UpdateImpl or(Boolean condition) { + return or(condition(condition)); + } + @Override public final UpdateImpl or(String sql) { return or(condition(sql)); @@ -634,6 +654,11 @@ final class UpdateImpl return orNot(condition(condition)); } + @Override + public final UpdateImpl orNot(Boolean condition) { + return orNot(condition(condition)); + } + @Override public final UpdateImpl orExists(Select select) { return or(exists(select));