diff --git a/jOOQ/src/main/java/org/jooq/conf/Settings.java b/jOOQ/src/main/java/org/jooq/conf/Settings.java index 86fbd3ff62..1841222572 100644 --- a/jOOQ/src/main/java/org/jooq/conf/Settings.java +++ b/jOOQ/src/main/java/org/jooq/conf/Settings.java @@ -118,12 +118,16 @@ public class Settings @XmlElement(defaultValue = "true") protected Boolean transformPatternsNotNot = true; @XmlElement(defaultValue = "true") + protected Boolean transformPatternsNotTruthValue = true; + @XmlElement(defaultValue = "true") + protected Boolean transformPatternsNotComparison = true; + @XmlElement(defaultValue = "true") + protected Boolean transformPatternsNotNotDistinct = true; + @XmlElement(defaultValue = "true") protected Boolean transformPatternsNegNeg = true; @XmlElement(defaultValue = "true") protected Boolean transformPatternsBitNotBitNot = true; @XmlElement(defaultValue = "true") - protected Boolean transformPatternsNotNotDistinct = true; - @XmlElement(defaultValue = "true") protected Boolean transformPatternsIdempotentFunctionRepetition = true; @XmlElement(defaultValue = "false") protected Boolean transformAnsiJoinToTableLists = false; @@ -1153,7 +1157,7 @@ public class Settings } /** - * Transform LTRIM(RTRIM(x)) or RTRIM(LTRIM(x)) to TRIM(x) + * Transform LTRIM(RTRIM(x)) or RTRIM(LTRIM(x)) to TRIM(x). *

* Historically, a few dialects did not implement TRIM(x) or TRIM(BOTH FROM x), * so users worked around this by wrapping LTRIM() and RTRIM() with each other. @@ -1185,7 +1189,7 @@ public class Settings } /** - * Transform NOT(NOT(x)) to x + * Transform NOT(NOT(x)) to x. *

* This transformation removes a redundant logic negation. *

@@ -1214,6 +1218,92 @@ public class Settings this.transformPatternsNotNot = value; } + /** + * Transform NOT(TRUE) to FALSE and NOT(FALSE) to TRUE. + *

+ * This transformation removes a redundant logic negation of truth values. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTransformPatternsNotTruthValue() { + return transformPatternsNotTruthValue; + } + + /** + * Sets the value of the transformPatternsNotTruthValue property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTransformPatternsNotTruthValue(Boolean value) { + this.transformPatternsNotTruthValue = value; + } + + /** + * Transform NOT (a != b) to a = b/code>, and similar comparisons. + *

+ * This transformation removes a redundant logical negation from the DISTINCT predicate. + *

+ * This feature is available in the commercial distribution only. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTransformPatternsNotComparison() { + return transformPatternsNotComparison; + } + + /** + * Sets the value of the transformPatternsNotComparison property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTransformPatternsNotComparison(Boolean value) { + this.transformPatternsNotComparison = value; + } + + /** + * Transform NOT (a IS NOT DISTINCT FROM b) to a IS DISTINCT FROM b. + *

+ * This transformation removes a redundant logical negation from the DISTINCT predicate. + *

+ * This feature is available in the commercial distribution only. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTransformPatternsNotNotDistinct() { + return transformPatternsNotNotDistinct; + } + + /** + * Sets the value of the transformPatternsNotNotDistinct property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTransformPatternsNotNotDistinct(Boolean value) { + this.transformPatternsNotNotDistinct = value; + } + /** * Transform -(-(x)) to x *

@@ -1275,35 +1365,7 @@ public class Settings } /** - * Transform NOT (a IS NOT DISTINCT FROM b) to a IS DISTINCT FROM b - *

- * This transformation removes a redundant logical negation from the DISTINCT predicate. - *

- * This feature is available in the commercial distribution only. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isTransformPatternsNotNotDistinct() { - return transformPatternsNotNotDistinct; - } - - /** - * Sets the value of the transformPatternsNotNotDistinct property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setTransformPatternsNotNotDistinct(Boolean value) { - this.transformPatternsNotNotDistinct = value; - } - - /** - * Transform all repetitions of idempotent functions, such as UPPER(UPPER(s)) to UPPER(s) + * Transform all repetitions of idempotent functions, such as UPPER(UPPER(s)) to UPPER(s). *

* Idempotent functions that are covered so far, include: *