Skip to content

Commit 70302fb

Browse files
author
Washmore
committed
适配jdbc里面的[B为byte[];
washmore
1 parent e39af98 commit 70302fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autocode.core/src/main/java/tech/washmore/autocode/core/db/DataTableParser.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public static List<ColumnModel> parseColumn(String dbname, String tableName) thr
5757
if (userType != null) {
5858
cm.setFieldType(userType);
5959
} else {
60-
cm.setFieldType(data.getColumnClassName(index));
60+
cm.setFieldType("[B".equals(data.getColumnClassName(index)) ? "byte[]" : data.getColumnClassName(index));
6161
}
62-
cm.setFieldTypeFullName(data.getColumnClassName(index));
62+
cm.setFieldTypeFullName("[B".equals(data.getColumnClassName(index)) ? "byte[]" : data.getColumnClassName(index));
6363
cm.setJdbcType(JdbcType.forCode(data.getColumnType(index)).name());
6464
columnModels.add(cm);
6565
}

0 commit comments

Comments
 (0)