提交 1955d95a 编写于 作者: S Serge Rider 提交者: GitHub

Merge pull request #9926 from dbeaver/db-type-map#9685

#9685 Make DBPDataKind.CONTENT and DBPDataKind.BINARY compatible

Former-commit-id: a004e99e
......@@ -48,7 +48,7 @@ public enum DBPDataKind
}
public static boolean canConsume(DBPDataKind sourceKind, DBPDataKind targetKind) {
if (targetKind == CONTENT) {
if (targetKind == CONTENT || targetKind == BINARY) {
return sourceKind == STRING || sourceKind == BINARY || sourceKind == CONTENT;
} else if (targetKind == STRING) {
return sourceKind == STRING;// || sourceKind == NUMERIC || sourceKind == BOOLEAN || sourceKind == DATETIME;
......
......@@ -236,7 +236,7 @@ public final class DBStructUtils {
// Let's try to find something similar
Map<String, DBSDataType> possibleTypes = new HashMap<>();
for (DBSDataType type : dataTypeProvider.getLocalDataTypes()) {
if (type.getDataKind() == dataKind) {
if (DBPDataKind.canConsume(type.getDataKind(), dataKind)) {
possibleTypes.put(type.getTypeName().toLowerCase(Locale.ENGLISH), type);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册