提交 04ee3cb1 编写于 作者: S Serge Rider

#1834 Default data type name detect

上级 202020b0
......@@ -525,6 +525,22 @@ public abstract class JDBCDataSource
@Override
public String getDefaultDataTypeName(@NotNull DBPDataKind dataKind)
{
String typeName = getStandardSQLDataTypeName(dataKind);
DBSDataType dataType = getLocalDataType(typeName);
if (dataType == null) {
// No such data type
// Try to find first data type of this kind
for (DBSDataType type : getLocalDataTypes()) {
if (type.getDataKind() == dataKind) {
return type.getName();
}
}
}
return typeName;
}
@NotNull
private String getStandardSQLDataTypeName(@NotNull DBPDataKind dataKind) {
switch (dataKind) {
case BOOLEAN: return "BOOLEAN";
case NUMERIC: return "NUMERIC";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册