diff --git a/jOOQ/src/main/java/org/jooq/conf/Settings.java b/jOOQ/src/main/java/org/jooq/conf/Settings.java index 77c3b2289b..6f00bfb812 100644 --- a/jOOQ/src/main/java/org/jooq/conf/Settings.java +++ b/jOOQ/src/main/java/org/jooq/conf/Settings.java @@ -85,6 +85,8 @@ public class Settings @XmlElement(defaultValue = "IMPLICIT_NULL") @XmlSchemaType(name = "string") protected RenderDefaultNullability renderDefaultNullability = RenderDefaultNullability.IMPLICIT_NULL; + @XmlElement(defaultValue = "false") + protected Boolean renderCoalesceToEmptyStringInConcat = false; @XmlElement(defaultValue = "true") protected Boolean renderOrderByRownumberForEmulatedPagination = true; @XmlElement(defaultValue = "true") @@ -700,6 +702,35 @@ public class Settings this.renderDefaultNullability = value; } + /** + * Whether stored function calls should be wrapped in scalar subqueries. + *
+ * Oracle 11g (and potentially, other databases too) implements scalar subquery caching. With this flag + * set to true, users can automatically profit from this feature in all SQL statements. + *
+ * This feature is available in the commercial distribution only.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isRenderCoalesceToEmptyStringInConcat() {
+ return renderCoalesceToEmptyStringInConcat;
+ }
+
+ /**
+ * Sets the value of the renderCoalesceToEmptyStringInConcat property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setRenderCoalesceToEmptyStringInConcat(Boolean value) {
+ this.renderCoalesceToEmptyStringInConcat = value;
+ }
+
/**
* Whether an additional ORDER BY rn clause should be rendered on emulated paginated queries.
*
@@ -2829,6 +2860,11 @@ public class Settings
return this;
}
+ public Settings withRenderCoalesceToEmptyStringInConcat(Boolean value) {
+ setRenderCoalesceToEmptyStringInConcat(value);
+ return this;
+ }
+
public Settings withRenderOrderByRownumberForEmulatedPagination(Boolean value) {
setRenderOrderByRownumberForEmulatedPagination(value);
return this;
@@ -3564,6 +3600,7 @@ public class Settings
builder.append("renderScalarSubqueriesForStoredFunctions", renderScalarSubqueriesForStoredFunctions);
builder.append("renderImplicitJoinType", renderImplicitJoinType);
builder.append("renderDefaultNullability", renderDefaultNullability);
+ builder.append("renderCoalesceToEmptyStringInConcat", renderCoalesceToEmptyStringInConcat);
builder.append("renderOrderByRownumberForEmulatedPagination", renderOrderByRownumberForEmulatedPagination);
builder.append("renderOutputForSQLServerReturningClause", renderOutputForSQLServerReturningClause);
builder.append("renderParenthesisAroundSetOperationQueries", renderParenthesisAroundSetOperationQueries);
@@ -3847,6 +3884,15 @@ public class Settings
return false;
}
}
+ if (renderCoalesceToEmptyStringInConcat == null) {
+ if (other.renderCoalesceToEmptyStringInConcat!= null) {
+ return false;
+ }
+ } else {
+ if (!renderCoalesceToEmptyStringInConcat.equals(other.renderCoalesceToEmptyStringInConcat)) {
+ return false;
+ }
+ }
if (renderOrderByRownumberForEmulatedPagination == null) {
if (other.renderOrderByRownumberForEmulatedPagination!= null) {
return false;
@@ -4692,6 +4738,7 @@ public class Settings
result = ((prime*result)+((renderScalarSubqueriesForStoredFunctions == null)? 0 :renderScalarSubqueriesForStoredFunctions.hashCode()));
result = ((prime*result)+((renderImplicitJoinType == null)? 0 :renderImplicitJoinType.hashCode()));
result = ((prime*result)+((renderDefaultNullability == null)? 0 :renderDefaultNullability.hashCode()));
+ result = ((prime*result)+((renderCoalesceToEmptyStringInConcat == null)? 0 :renderCoalesceToEmptyStringInConcat.hashCode()));
result = ((prime*result)+((renderOrderByRownumberForEmulatedPagination == null)? 0 :renderOrderByRownumberForEmulatedPagination.hashCode()));
result = ((prime*result)+((renderOutputForSQLServerReturningClause == null)? 0 :renderOutputForSQLServerReturningClause.hashCode()));
result = ((prime*result)+((renderParenthesisAroundSetOperationQueries == null)? 0 :renderParenthesisAroundSetOperationQueries.hashCode()));
diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractField.java b/jOOQ/src/main/java/org/jooq/impl/AbstractField.java
index fc3756840f..8a70808b2c 100644
--- a/jOOQ/src/main/java/org/jooq/impl/AbstractField.java
+++ b/jOOQ/src/main/java/org/jooq/impl/AbstractField.java
@@ -137,6 +137,10 @@ abstract class AbstractField
diff --git a/jOOQ/src/main/java/org/jooq/impl/Concat.java b/jOOQ/src/main/java/org/jooq/impl/Concat.java
index 30950b709f..572c0366a1 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Concat.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Concat.java
@@ -38,6 +38,7 @@
package org.jooq.impl;
import static org.jooq.impl.DSL.function;
+import static org.jooq.impl.DSL.inline;
import static org.jooq.impl.ExpressionOperator.ADD;
import static org.jooq.impl.ExpressionOperator.BIT_AND;
import static org.jooq.impl.ExpressionOperator.CONCAT;
@@ -71,6 +72,14 @@ final class Concat extends AbstractField
+This feature is available in the commercial distribution only.]]>