Skip to content

Commit

Permalink
0003966: Mapped Oracle CLOB and NCLOB types to MariaDB LONGTEXT type
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-miller-jumpmind committed Aug 16, 2022
1 parent fa3a396 commit 5bd3d79
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -382,13 +382,6 @@ public String getSqlType(Column column) {
sqlType = tmpSqlType.toString();
}
}
pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE);
if (pc == null) {
pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE122);
}
if (pc != null && "LONG".equals(pc.getType())) {
sqlType = "LONGTEXT";
}
if ("TINYBLOB".equalsIgnoreCase(column.getJdbcTypeName())) {
// For some reason, MySql driver returns BINARY type for TINYBLOB instead of BLOB type
sqlType = "TINYBLOB";
Expand All @@ -402,6 +395,13 @@ public String getSqlType(Column column) {
sqlType = "LONGTEXT";
}
}
pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE);
if (pc == null) {
pc = column.getPlatformColumns() == null ? null : column.getPlatformColumns().get(DatabaseNamesConstants.ORACLE122);
}
if (pc != null && ("LONG".equals(pc.getType()) || "CLOB".equals(pc.getType()) || "NCLOB".equals(pc.getType()))) {
sqlType = "LONGTEXT";
}
return sqlType;
}
}

0 comments on commit 5bd3d79

Please sign in to comment.