Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
f310d9af
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f310d9af
编写于
6月 07, 2019
作者:
S
Serge Rider
提交者:
GitHub
6月 07, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6071 from dbeaver/Readable_error_message
187 No readable error message appears
上级
cf992d1d
793f1bc1
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
38 addition
and
7 deletion
+38
-7
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanAnalyser.java
...jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanAnalyser.java
+4
-2
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/plan/OracleQueryPlanner.java
...iss/dbeaver/ext/oracle/model/plan/OracleQueryPlanner.java
+1
-1
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/plan/PostgreQueryPlaner.java
...dbeaver/ext/postgresql/model/plan/PostgreQueryPlaner.java
+3
-2
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/plan/AbstractExecutionPlanSerializer.java
...aver/model/impl/plan/AbstractExecutionPlanSerializer.java
+29
-0
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/plan/ExplainPlanViewer.java
.../jkiss/dbeaver/ui/editors/sql/plan/ExplainPlanViewer.java
+1
-2
未找到文件。
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanAnalyser.java
浏览文件 @
f310d9af
...
...
@@ -145,8 +145,10 @@ public class MySQLPlanAnalyser extends AbstractExecutionPlanSerializer implement
public
DBCPlan
deserialize
(
@NotNull
Reader
planData
)
throws
IOException
,
InvocationTargetException
{
JsonObject
jo
=
new
JsonParser
().
parse
(
planData
).
getAsJsonObject
();
String
savedVersion
=
jo
.
get
(
AbstractExecutionPlanSerializer
.
PROP_VERSION
).
getAsString
();
String
query
=
jo
.
get
(
AbstractExecutionPlanSerializer
.
PROP_SQL
).
getAsString
();
String
savedVersion
=
getVersion
(
jo
);
String
query
=
getQuery
(
jo
);
if
(
savedVersion
.
equals
(
"classic"
))
{
ExecutionPlanDeserializer
<
MySQLPlanNodePlain
>
loader
=
new
ExecutionPlanDeserializer
<>();
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/plan/OracleQueryPlanner.java
浏览文件 @
f310d9af
...
...
@@ -173,7 +173,7 @@ public class OracleQueryPlanner extends AbstractExecutionPlanSerializer impleme
JsonObject
jo
=
new
JsonParser
().
parse
(
planData
).
getAsJsonObject
();
String
query
=
jo
.
get
(
AbstractExecutionPlanSerializer
.
PROP_SQL
).
getAsString
(
);
String
query
=
getQuery
(
jo
);
ExecutionPlanDeserializer
<
OraclePlanNode
>
loader
=
new
ExecutionPlanDeserializer
<>();
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/plan/PostgreQueryPlaner.java
浏览文件 @
f310d9af
...
...
@@ -18,6 +18,7 @@ package org.jkiss.dbeaver.ext.postgresql.model.plan;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonElement
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
com.google.gson.JsonPrimitive
;
...
...
@@ -104,7 +105,7 @@ public class PostgreQueryPlaner extends AbstractExecutionPlanSerializer implemen
try
{
JsonObject
jo
=
new
JsonParser
().
parse
(
planData
).
getAsJsonObject
();
String
query
=
jo
.
get
(
AbstractExecutionPlanSerializer
.
PROP_SQL
).
getAsString
(
);
String
query
=
getQuery
(
jo
);
ExecutionPlanDeserializer
<
PostgrePlanNodeExternal
>
loader
=
new
ExecutionPlanDeserializer
<>();
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/plan/AbstractExecutionPlanSerializer.java
浏览文件 @
f310d9af
...
...
@@ -21,9 +21,12 @@ package org.jkiss.dbeaver.model.impl.plan;
import
java.io.IOException
;
import
java.io.Writer
;
import
java.lang.reflect.InvocationTargetException
;
import
java.time.LocalDateTime
;
import
com.google.gson.*
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlan
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNode
;
import
org.jkiss.dbeaver.model.exec.plan.DBCQueryPlannerSerialInfo
;
...
...
@@ -99,5 +102,31 @@ public abstract class AbstractExecutionPlanSerializer implements DBCQueryPlanne
writer
.
write
(
gson
.
toJson
(
root
));
}
protected
String
getVersion
(
@NotNull
JsonObject
o
)
throws
InvocationTargetException
{
JsonElement
queryElement
=
o
.
get
(
AbstractExecutionPlanSerializer
.
PROP_VERSION
);
if
(
queryElement
==
null
)
{
throw
new
InvocationTargetException
(
new
Exception
(
"Incorrect file format"
));
}
return
queryElement
.
getAsString
();
}
protected
String
getQuery
(
@NotNull
JsonObject
o
)
throws
InvocationTargetException
{
JsonElement
queryElement
=
o
.
get
(
AbstractExecutionPlanSerializer
.
PROP_SQL
);
if
(
queryElement
==
null
)
{
throw
new
InvocationTargetException
(
new
Exception
(
"Incorrect file format"
));
}
return
queryElement
.
getAsString
();
}
}
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/plan/ExplainPlanViewer.java
浏览文件 @
f310d9af
...
...
@@ -201,8 +201,7 @@ public class ExplainPlanViewer extends Viewer implements IAdaptable
return
true
;
}
catch
(
IOException
|
InvocationTargetException
e
)
{
DBWorkbench
.
getPlatformUI
().
showError
(
"Load plan"
,
"Error loading plan "
,
(
e
.
getCause
()
!=
null
)
?
e
.
getCause
().
getCause
()
:
e
);
DBWorkbench
.
getPlatformUI
().
showError
(
"Load plan"
,
"Error loading plan "
,
GeneralUtils
.
getRootCause
(
e
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录