diff --git a/jOOQ/src/main/java/org/jooq/conf/Settings.java b/jOOQ/src/main/java/org/jooq/conf/Settings.java index 236aaa12be..c106200eac 100644 --- a/jOOQ/src/main/java/org/jooq/conf/Settings.java +++ b/jOOQ/src/main/java/org/jooq/conf/Settings.java @@ -68,6 +68,8 @@ public class Settings protected Boolean renderScalarSubqueriesForStoredFunctions = false; @XmlElement(defaultValue = "true") protected Boolean renderOrderByRownumberForEmulatedPagination = true; + @XmlElement(defaultValue = "false") + protected Boolean transformTableListsToAnsiJoin = false; @XmlElement(defaultValue = "DEFAULT") @XmlSchemaType(name = "string") protected BackslashEscaping backslashEscaping = BackslashEscaping.DEFAULT; @@ -500,6 +502,38 @@ public class Settings this.renderOrderByRownumberForEmulatedPagination = value; } + /** + * Transform table lists to ANSI join if possible + *
+ * (Very) historically, prior to ANSI join syntax, joins were implemented by listing tables in
+ * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific
+ * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join
+ * support. Migrating such join syntax is tedious. The jOOQ parser can parse the old syntax and
+ * this flag enables the transformation to ANSI join syntax.
+ *
+ * This feature is available in the commercial distribution only.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isTransformTableListsToAnsiJoin() {
+ return transformTableListsToAnsiJoin;
+ }
+
+ /**
+ * Sets the value of the transformTableListsToAnsiJoin property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setTransformTableListsToAnsiJoin(Boolean value) {
+ this.transformTableListsToAnsiJoin = value;
+ }
+
/**
* Whether string literals should be escaped with backslash.
*
@@ -1438,6 +1472,11 @@ public class Settings
return this;
}
+ public Settings withTransformTableListsToAnsiJoin(Boolean value) {
+ setTransformTableListsToAnsiJoin(value);
+ return this;
+ }
+
public Settings withBackslashEscaping(BackslashEscaping value) {
setBackslashEscaping(value);
return this;
@@ -1681,6 +1720,11 @@ public class Settings
sb.append(renderOrderByRownumberForEmulatedPagination);
sb.append("");
}
+ if (transformTableListsToAnsiJoin!= null) {
+ sb.append("
+This feature is available in the commercial distribution only.]]>ORDER BY clause.
For details, see https://github.com/jOOQ/jOOQ/issues/7609.]]>
+ (+) (Oracle, DB2) or *= (SQL Server) for outer join
+support. Migrating such join syntax is tedious. The jOOQ parser can parse the old syntax and
+this flag enables the transformation to ANSI join syntax.
+