提交 56674ca0 编写于 作者: S Serge Rider

#1382 MySQL: JSON value edit for custom queries.

上级 491a6439
......@@ -38,7 +38,7 @@ public class MySQLValueHandlerProvider implements DBDValueHandlerProvider {
{
if (typedObject.getDataKind() == DBPDataKind.DATETIME) {
return new MySQLDateTimeValueHandler(preferences.getDataFormatterProfile());
} else if (typedObject.getTypeName().equals(MySQLConstants.TYPE_JSON)) {
} else if (typedObject.getTypeName().equalsIgnoreCase(MySQLConstants.TYPE_JSON)) {
return JDBCContentValueHandler.INSTANCE;
} else {
return null;
......
......@@ -42,6 +42,7 @@ import org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext;
import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils;
import org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCBasicDataTypeCache;
import org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCObjectCache;
import org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCDataType;
import org.jkiss.dbeaver.model.impl.sql.QueryTransformerLimit;
import org.jkiss.dbeaver.model.net.DBWHandlerConfiguration;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
......@@ -197,6 +198,9 @@ public class MySQLDataSource extends JDBCDataSource implements DBSObjectSelector
super.initialize(monitor);
dataTypeCache.getAllObjects(monitor, this);
if (isServerVersionAtLeast(5, 7) && dataTypeCache.getCachedObject(MySQLConstants.TYPE_JSON) == null) {
dataTypeCache.cacheObject(new JDBCDataType<>(this, java.sql.Types.OTHER, MySQLConstants.TYPE_JSON, MySQLConstants.TYPE_JSON, false, true, 0, 0, 0));
}
try (JDBCSession session = DBUtils.openMetaSession(monitor, this, "Load basic datasource metadata")) {
// Read engines
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册