Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
6780a17e
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
6780a17e
编写于
2月 18, 2019
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Plan renderer enhancements
上级
2734e0be
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
89 addition
and
5 deletion
+89
-5
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanAnalyser.java
...jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanAnalyser.java
+9
-0
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanNode.java
...org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanNode.java
+13
-1
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/plan/OraclePlanAnalyser.java
...iss/dbeaver/ext/oracle/model/plan/OraclePlanAnalyser.java
+3
-2
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/plan/PostgrePlanAnalyser.java
...beaver/ext/postgresql/model/plan/PostgrePlanAnalyser.java
+3
-2
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/exec/plan/DBCPlanNode.java
...el/src/org/jkiss/dbeaver/model/exec/plan/DBCPlanNode.java
+2
-0
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/exec/plan/DBCPlanNodeKind.java
...rc/org/jkiss/dbeaver/model/exec/plan/DBCPlanNodeKind.java
+53
-0
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/plan/AbstractExecutionPlanNode.java
...ss/dbeaver/model/impl/plan/AbstractExecutionPlanNode.java
+6
-0
未找到文件。
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanAnalyser.java
浏览文件 @
6780a17e
...
...
@@ -22,6 +22,7 @@ import org.jkiss.dbeaver.model.exec.DBCSession;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCSession
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanCostNode
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNode
;
import
org.jkiss.dbeaver.model.impl.plan.AbstractExecutionPlan
;
import
org.jkiss.dbeaver.model.sql.SQLUtils
;
...
...
@@ -46,6 +47,14 @@ public class MySQLPlanAnalyser extends AbstractExecutionPlan {
this
.
query
=
query
;
}
@Override
public
Object
getPlanFeature
(
String
feature
)
{
if
(
DBCPlanCostNode
.
FEATURE_PLAN_ROWS
.
equals
(
feature
))
{
return
true
;
}
return
super
.
getPlanFeature
(
feature
);
}
@Override
public
String
getQueryString
()
{
return
query
;
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/plan/MySQLPlanNode.java
浏览文件 @
6780a17e
...
...
@@ -17,7 +17,7 @@
package
org.jkiss.dbeaver.ext.mysql.model.plan
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanCostNode
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNode
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNode
Kind
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.impl.plan.AbstractExecutionPlanNode
;
import
org.jkiss.dbeaver.model.meta.Property
;
...
...
@@ -126,6 +126,18 @@ public class MySQLPlanNode extends AbstractExecutionPlanNode implements DBCPlanC
return
table
;
}
@Override
public
DBCPlanNodeKind
getNodeKind
()
{
if
(
"SIMPLE"
.
equals
(
selectType
))
{
return
DBCPlanNodeKind
.
SELECT
;
}
else
if
(
"JOIN"
.
equals
(
selectType
))
{
return
DBCPlanNodeKind
.
JOIN
;
}
else
if
(
"UNION"
.
equals
(
selectType
))
{
return
DBCPlanNodeKind
.
UNION
;
}
return
super
.
getNodeKind
();
}
@Override
public
String
getNodeDescription
()
{
return
ref
;
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/plan/OraclePlanAnalyser.java
浏览文件 @
6780a17e
...
...
@@ -59,8 +59,9 @@ public class OraclePlanAnalyser extends AbstractExecutionPlan {
@Override
public
Object
getPlanFeature
(
String
feature
)
{
if
(
DBCPlanCostNode
.
FEATURE_PLAN_COST
.
equalsIgnoreCase
(
feature
)
|
DBCPlanCostNode
.
FEATURE_PLAN_DURATION
.
equalsIgnoreCase
(
feature
))
if
(
DBCPlanCostNode
.
FEATURE_PLAN_COST
.
equals
(
feature
)
||
DBCPlanCostNode
.
FEATURE_PLAN_DURATION
.
equals
(
feature
)
||
DBCPlanCostNode
.
FEATURE_PLAN_ROWS
.
equals
(
feature
))
{
return
true
;
}
else
if
(
DBCPlanCostNode
.
PLAN_DURATION_MEASURE
.
equals
(
feature
))
{
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/plan/PostgrePlanAnalyser.java
浏览文件 @
6780a17e
...
...
@@ -56,8 +56,9 @@ public class PostgrePlanAnalyser extends AbstractExecutionPlan {
@Override
public
Object
getPlanFeature
(
String
feature
)
{
if
(
DBCPlanCostNode
.
FEATURE_PLAN_COST
.
equalsIgnoreCase
(
feature
)
|
DBCPlanCostNode
.
FEATURE_PLAN_DURATION
.
equalsIgnoreCase
(
feature
))
if
(
DBCPlanCostNode
.
FEATURE_PLAN_COST
.
equals
(
feature
)
||
DBCPlanCostNode
.
FEATURE_PLAN_DURATION
.
equals
(
feature
)
||
DBCPlanCostNode
.
FEATURE_PLAN_ROWS
.
equals
(
feature
))
{
return
true
;
}
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/exec/plan/DBCPlanNode.java
浏览文件 @
6780a17e
...
...
@@ -26,6 +26,8 @@ import java.util.Collection;
*/
public
interface
DBCPlanNode
extends
DBPObject
{
DBCPlanNodeKind
getNodeKind
();
String
getNodeName
();
String
getNodeType
();
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/exec/plan/DBCPlanNodeKind.java
0 → 100644
浏览文件 @
6780a17e
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.model.exec.plan
;
import
org.jkiss.dbeaver.model.impl.struct.RelationalObjectType
;
import
org.jkiss.dbeaver.model.struct.DBSObjectType
;
/**
* Execution plan node kind
*/
public
enum
DBCPlanNodeKind
{
DEFAULT
(
"Node"
,
null
),
SELECT
(
"Select"
,
null
),
TABLE_SCAN
(
"Table scan"
,
RelationalObjectType
.
TYPE_TABLE
),
INDEX_SCAN
(
"Index scan"
,
RelationalObjectType
.
TYPE_INDEX
),
JOIN
(
"Join"
,
null
),
UNION
(
"Union"
,
null
),
FILTER
(
"Filter"
,
null
),
AGGREGATE
(
"Aggregate"
,
null
),
SORT
(
"Sort"
,
null
);
private
final
String
title
;
private
final
DBSObjectType
objectType
;
DBCPlanNodeKind
(
String
title
,
DBSObjectType
objectType
)
{
this
.
title
=
title
;
this
.
objectType
=
objectType
;
}
public
String
getTitle
()
{
return
title
;
}
public
DBSObjectType
getObjectType
()
{
return
objectType
;
}
}
\ No newline at end of file
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/plan/AbstractExecutionPlanNode.java
浏览文件 @
6780a17e
...
...
@@ -18,12 +18,18 @@
package
org.jkiss.dbeaver.model.impl.plan
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNode
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNodeKind
;
/**
* Abstract execution plan
*/
public
abstract
class
AbstractExecutionPlanNode
implements
DBCPlanNode
{
@Override
public
DBCPlanNodeKind
getNodeKind
()
{
return
null
;
}
@Override
public
String
getNodeCondition
()
{
return
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录