fix(hana): show character field length in column types
This commit is contained in:
6 files changed
+68
-10
No files matched your search
@@ -295,7 +295,9 @@ public final class DdlBuilder {
|
||||
private static boolean isCharacterType(String normalized) {
|
||||
return "character varying".equals(normalized)
|
||||
|| "varchar".equals(normalized)
|
||||
|| "nvarchar".equals(normalized)
|
||||
|| "char".equals(normalized)
|
||||
|| "nchar".equals(normalized)
|
||||
|| "character".equals(normalized);
|
||||
}
|
||||
|
||||
|
||||
@@ -724,6 +724,30 @@ class CommonJavaCompatibilityTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
void buildsTableDdlWithNationalCharacterLength() {
|
||||
String ddl = DdlBuilder.buildTableDdl(
|
||||
"DBX_DEMO",
|
||||
"CUSTOMERS",
|
||||
Collections.singletonList(new ColumnInfo(
|
||||
"NAME",
|
||||
"NVARCHAR",
|
||||
false,
|
||||
null,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
100
|
||||
)),
|
||||
Collections.emptyList(),
|
||||
Collections.emptyList()
|
||||
);
|
||||
|
||||
assertTrue(ddl.contains("\"NAME\" NVARCHAR(100) NOT NULL"));
|
||||
}
|
||||
|
||||
private static class MinimalAgent implements DatabaseAgent {
|
||||
@Override
|
||||
public void connect(ConnectParams params) {
|
||||
|
||||
Reference in new issue
Block a user