Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
558cd446
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,发现更多精彩内容 >>
提交
558cd446
编写于
6月 21, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DB2 FQ names fix.
DB2 tables cache fix. Former-commit-id:
e8b0902f
上级
59f3d7bd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
35 deletion
+33
-35
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/struct/rdb/DBSProcedure.java
.../src/org/jkiss/dbeaver/model/struct/rdb/DBSProcedure.java
+1
-1
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/manager/DB2SchemaManager.java
...c/org/jkiss/dbeaver/ext/db2/manager/DB2SchemaManager.java
+3
-3
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Routine.java
...r.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Routine.java
+8
-2
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Schema.java
...er.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Schema.java
+17
-28
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableBase.java
...db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableBase.java
+4
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/struct/rdb/DBSProcedure.java
浏览文件 @
558cd446
...
...
@@ -30,7 +30,7 @@ import java.util.Collection;
*/
public
interface
DBSProcedure
extends
DBSObject
,
DBPQualifiedObject
{
DBSObject
Container
getContainer
();
DBSObject
getContainer
();
DBSProcedureType
getProcedureType
();
...
...
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/manager/DB2SchemaManager.java
浏览文件 @
558cd446
...
...
@@ -27,6 +27,7 @@ import org.eclipse.swt.widgets.Shell;
import
org.eclipse.swt.widgets.Text
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.edit.DBEPersistAction
;
import
org.jkiss.dbeaver.ext.db2.model.DB2DataSource
;
import
org.jkiss.dbeaver.ext.db2.model.DB2Schema
;
...
...
@@ -80,9 +81,8 @@ public class DB2SchemaManager extends SQLObjectEditor<DB2Schema, DB2DataSource>
@Override
protected
DBEPersistAction
[]
makeObjectCreateActions
(
ObjectCreateCommand
command
)
{
String
schemaName
=
command
.
getObject
().
getName
();
SQLDatabasePersistAction
action
=
new
SQLDatabasePersistAction
(
"Create schema"
,
String
.
format
(
SQL_CREATE_SCHEMA
,
schemaName
));
DBUtils
.
getQuotedIdentifier
(
command
.
getObject
())
));
return
new
DBEPersistAction
[]
{
action
};
}
...
...
@@ -91,7 +91,7 @@ public class DB2SchemaManager extends SQLObjectEditor<DB2Schema, DB2DataSource>
{
String
schemaName
=
command
.
getObject
().
getName
();
DBEPersistAction
action
=
new
SQLDatabasePersistAction
(
"Drop schema (SQL)"
,
String
.
format
(
SQL_DROP_SCHEMA
,
schemaName
));
DBUtils
.
getQuotedIdentifier
(
command
.
getObject
())
));
return
new
DBEPersistAction
[]
{
action
};
}
...
...
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Routine.java
浏览文件 @
558cd446
...
...
@@ -33,6 +33,7 @@ import org.jkiss.dbeaver.ext.db2.model.dict.DB2RoutineValidType;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2YesNo
;
import
org.jkiss.dbeaver.ext.db2.model.module.DB2Module
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.meta.Property
;
...
...
@@ -175,13 +176,18 @@ public class DB2Routine extends DB2Object<DBSObject> implements DBSProcedure, DB
@Override
public
String
getFullQualifiedName
()
{
return
parent
.
getName
()
+
"."
+
name
;
return
DBUtils
.
getFullQualifiedName
(
getDataSource
(),
parent
,
this
);
}
@Override
public
DBSObjectContainer
getContainer
()
{
return
getContainer
();
if
(
parent
instanceof
DBSObjectContainer
)
{
return
(
DBSObjectContainer
)
parent
;
}
return
db2Schema
;
}
@Override
...
...
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Schema.java
浏览文件 @
558cd446
...
...
@@ -52,9 +52,7 @@ import org.jkiss.utils.CommonUtils;
import
java.sql.ResultSet
;
import
java.sql.Timestamp
;
import
java.util.Collection
;
import
java.util.Map
;
import
java.util.TreeMap
;
import
java.util.*
;
/**
* DB2Schema
...
...
@@ -96,9 +94,6 @@ public class DB2Schema extends DB2GlobalObject implements DBSSchema, DBPRefresha
private
final
DB2TableReferenceCache
referenceCache
=
new
DB2TableReferenceCache
(
tableCache
);
private
final
DB2TableCheckConstraintCache
checkCache
=
new
DB2TableCheckConstraintCache
(
tableCache
);
// Combined Cache for the content assist to work. Aliases being not DB2TableBase, they are alas not included...
private
Map
<
String
,
DB2TableBase
>
allKindOfTableCache
;
private
String
name
;
private
String
owner
;
private
DB2OwnerType
ownerType
;
...
...
@@ -268,34 +263,28 @@ public class DB2Schema extends DB2GlobalObject implements DBSSchema, DBPRefresha
@Override
public
Collection
<
DB2TableBase
>
getChildren
(
DBRProgressMonitor
monitor
)
throws
DBException
{
// Build only once, a combined cache of ""Tables"" for content assist to work
if
(
allKindOfTableCache
==
null
)
{
allKindOfTableCache
=
new
TreeMap
<
String
,
DB2TableBase
>();
// TreeMap to keep things ordered
for
(
DB2Table
db2Table
:
tableCache
.
getObjects
(
monitor
,
this
))
{
allKindOfTableCache
.
put
(
db2Table
.
getName
(),
db2Table
);
}
for
(
DB2View
db2View
:
viewCache
.
getObjects
(
monitor
,
this
))
{
allKindOfTableCache
.
put
(
db2View
.
getName
(),
db2View
);
}
for
(
DB2MaterializedQueryTable
db2Mqt
:
mqtCache
.
getObjects
(
monitor
,
this
))
{
allKindOfTableCache
.
put
(
db2Mqt
.
getName
(),
db2Mqt
);
}
for
(
DB2Nickname
db2Nickname
:
nicknameCache
.
getObjects
(
monitor
,
this
))
{
allKindOfTableCache
.
put
(
db2Nickname
.
getName
(),
db2Nickname
);
}
}
return
allKindOfTableCache
.
values
();
List
<
DB2TableBase
>
allChildren
=
new
ArrayList
<
DB2TableBase
>();
allChildren
.
addAll
(
tableCache
.
getObjects
(
monitor
,
this
));
allChildren
.
addAll
(
viewCache
.
getObjects
(
monitor
,
this
));
allChildren
.
addAll
(
mqtCache
.
getObjects
(
monitor
,
this
));
allChildren
.
addAll
(
nicknameCache
.
getObjects
(
monitor
,
this
));
return
allChildren
;
}
@Override
public
DB2TableBase
getChild
(
DBRProgressMonitor
monitor
,
String
childName
)
throws
DBException
{
if
(
allKindOfTableCache
==
null
)
{
getChildren
(
monitor
);
DB2TableBase
child
=
tableCache
.
getObject
(
monitor
,
this
,
childName
);
if
(
child
==
null
)
{
child
=
viewCache
.
getObject
(
monitor
,
this
,
childName
);
}
if
(
child
==
null
)
{
child
=
mqtCache
.
getObject
(
monitor
,
this
,
childName
);
}
if
(
child
==
null
)
{
child
=
nicknameCache
.
getObject
(
monitor
,
this
,
childName
);
}
return
allKindOfTableCache
.
get
(
childName
)
;
return
child
;
}
// -----------------
...
...
plugins/org.jkiss.dbeaver.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableBase.java
浏览文件 @
558cd446
...
...
@@ -25,6 +25,7 @@ import org.jkiss.dbeaver.ext.db2.editors.DB2StatefulObject;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2OwnerType
;
import
org.jkiss.dbeaver.model.DBPNamedObject2
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.impl.DBObjectNameCaseTransformer
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
...
...
@@ -100,7 +101,9 @@ public abstract class DB2TableBase extends JDBCTable<DB2DataSource, DB2Schema> i
@Override
public
String
getFullQualifiedName
()
{
return
getContainer
().
getName
()
+
"."
+
this
.
getName
();
return
DBUtils
.
getFullQualifiedName
(
getDataSource
(),
getContainer
(),
this
);
}
// -----------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录