[jOOQ/jOOQ#10817] MetaImpl shouldn't produce explicit DEFAULT NULL value

This commit is contained in:
Lukas Eder 2020-10-29 15:38:19 +01:00
parent f0cb795d1e
commit fcbe607ff9

View File

@ -891,6 +891,11 @@ final class MetaImpl extends AbstractMeta {
int nullable = column.get(10, int.class); // NULLABLE
String remarks = column.get(11, String.class); // REMARKS
String defaultValue = column.get(12, String.class); // COLUMN_DEF
// [#10817] Some dialects may produce NULL (the expression) rather than NULL (the value)
if ("null".equalsIgnoreCase(defaultValue))
defaultValue = null;
boolean isAutoIncrement = column.size() >= 23
? column.get(22, boolean.class) // IS_AUTOINCREMENT
: false;