diff --git a/jOOQ/src/main/java/org/jooq/conf/Settings.java b/jOOQ/src/main/java/org/jooq/conf/Settings.java
index 9b27280444..98eea70b88 100644
--- a/jOOQ/src/main/java/org/jooq/conf/Settings.java
+++ b/jOOQ/src/main/java/org/jooq/conf/Settings.java
@@ -82,6 +82,9 @@ public class Settings
@XmlElement(defaultValue = "DEFAULT")
@XmlSchemaType(name = "string")
protected RenderImplicitJoinType renderImplicitJoinType = RenderImplicitJoinType.DEFAULT;
+ @XmlElement(defaultValue = "IMPLICIT_NULL")
+ @XmlSchemaType(name = "string")
+ protected RenderDefaultNullability renderDefaultNullability = RenderDefaultNullability.IMPLICIT_NULL;
@XmlElement(defaultValue = "true")
protected Boolean renderOrderByRownumberForEmulatedPagination = true;
@XmlElement(defaultValue = "true")
@@ -669,6 +672,22 @@ public class Settings
this.renderImplicitJoinType = value;
}
+ /**
+ * Whether the {@link org.jooq.Nullability#DEFAULT} nullablity should be rendered in generated DDL, and how it should be rendered.
+ *
+ */
+ public RenderDefaultNullability getRenderDefaultNullability() {
+ return renderDefaultNullability;
+ }
+
+ /**
+ * Whether the {@link org.jooq.Nullability#DEFAULT} nullablity should be rendered in generated DDL, and how it should be rendered.
+ *
+ */
+ public void setRenderDefaultNullability(RenderDefaultNullability value) {
+ this.renderDefaultNullability = value;
+ }
+
/**
* Whether an additional ORDER BY rn clause should be rendered on emulated paginated queries.
*
@@ -2661,6 +2680,15 @@ public class Settings
return this;
}
+ /**
+ * Whether the {@link org.jooq.Nullability#DEFAULT} nullablity should be rendered in generated DDL, and how it should be rendered.
+ *
+ */
+ public Settings withRenderDefaultNullability(RenderDefaultNullability value) {
+ setRenderDefaultNullability(value);
+ return this;
+ }
+
public Settings withRenderOrderByRownumberForEmulatedPagination(Boolean value) {
setRenderOrderByRownumberForEmulatedPagination(value);
return this;
@@ -3341,6 +3369,7 @@ public class Settings
builder.append("renderOptionalOuterKeyword", renderOptionalOuterKeyword);
builder.append("renderScalarSubqueriesForStoredFunctions", renderScalarSubqueriesForStoredFunctions);
builder.append("renderImplicitJoinType", renderImplicitJoinType);
+ builder.append("renderDefaultNullability", renderDefaultNullability);
builder.append("renderOrderByRownumberForEmulatedPagination", renderOrderByRownumberForEmulatedPagination);
builder.append("renderOutputForSQLServerReturningClause", renderOutputForSQLServerReturningClause);
builder.append("renderParenthesisAroundSetOperationQueries", renderParenthesisAroundSetOperationQueries);
@@ -3609,6 +3638,15 @@ public class Settings
return false;
}
}
+ if (renderDefaultNullability == null) {
+ if (other.renderDefaultNullability!= null) {
+ return false;
+ }
+ } else {
+ if (!renderDefaultNullability.equals(other.renderDefaultNullability)) {
+ return false;
+ }
+ }
if (renderOrderByRownumberForEmulatedPagination == null) {
if (other.renderOrderByRownumberForEmulatedPagination!= null) {
return false;
@@ -4399,6 +4437,7 @@ public class Settings
result = ((prime*result)+((renderOptionalOuterKeyword == null)? 0 :renderOptionalOuterKeyword.hashCode()));
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)+((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/Tools.java b/jOOQ/src/main/java/org/jooq/impl/Tools.java
index d15535024e..b786aa6a4e 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Tools.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Tools.java
@@ -62,11 +62,13 @@ import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
+// ...
import static org.jooq.conf.BackslashEscaping.DEFAULT;
import static org.jooq.conf.BackslashEscaping.ON;
import static org.jooq.conf.ParamType.INLINED;
import static org.jooq.conf.ParamType.NAMED;
import static org.jooq.conf.ParamType.NAMED_OR_INLINED;
+import static org.jooq.conf.RenderDefaultNullability.IMPLICIT_NULL;
import static org.jooq.conf.SettingsTools.getBackslashEscaping;
import static org.jooq.conf.SettingsTools.reflectionCaching;
import static org.jooq.conf.SettingsTools.updatablePrimaryKeys;
@@ -275,6 +277,7 @@ import org.jooq.UpdatableRecord;
import org.jooq.XML;
import org.jooq.conf.BackslashEscaping;
import org.jooq.conf.ParseNameCase;
+import org.jooq.conf.RenderDefaultNullability;
import org.jooq.conf.Settings;
import org.jooq.conf.SettingsTools;
import org.jooq.conf.ThrowExceptions;
@@ -834,6 +837,10 @@ final class Tools {
private static final Set