Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
64838cf4
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,发现更多精彩内容 >>
提交
64838cf4
编写于
12月 30, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#4876 SQL Server: mark system tables
Former-commit-id:
5e24f967
上级
53cc4826
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
27 addition
and
10 deletion
+27
-10
plugins/org.jkiss.dbeaver.ext.mssql/OSGI-INF/l10n/bundle.properties
...g.jkiss.dbeaver.ext.mssql/OSGI-INF/l10n/bundle.properties
+1
-0
plugins/org.jkiss.dbeaver.ext.mssql/plugin.xml
plugins/org.jkiss.dbeaver.ext.mssql/plugin.xml
+2
-0
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/SQLServerConstants.java
...l/src/org/jkiss/dbeaver/ext/mssql/SQLServerConstants.java
+2
-0
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerSchema.java
...rc/org/jkiss/dbeaver/ext/mssql/model/SQLServerSchema.java
+4
-2
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTable.java
...src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTable.java
+1
-1
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTableBase.java
...org/jkiss/dbeaver/ext/mssql/model/SQLServerTableBase.java
+15
-6
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerView.java
.../src/org/jkiss/dbeaver/ext/mssql/model/SQLServerView.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBIcon.java
...iss.dbeaver.model/src/org/jkiss/dbeaver/model/DBIcon.java
+1
-0
未找到文件。
plugins/org.jkiss.dbeaver.ext.mssql/OSGI-INF/l10n/bundle.properties
浏览文件 @
64838cf4
...
...
@@ -15,6 +15,7 @@ meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerSchema.description.name = Schema
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerSchema.objectId.name
=
ID
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerSchema.database.name
=
Schema database
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerTableBase.objectId.name
=
ID
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerTableBase.type.name
=
Type
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerTableBase.rowCount.name
=
Total row count
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerTableColumn.objectId.name
=
ID
meta.org.jkiss.dbeaver.ext.mssql.model.SQLServerTableColumn.dataType.name
=
Type
...
...
plugins/org.jkiss.dbeaver.ext.mssql/plugin.xml
浏览文件 @
64838cf4
...
...
@@ -39,8 +39,10 @@
<items
label=
"%tree.database.node.name"
path=
"database"
property=
"databases"
icon=
"#database"
>
<folder
type=
"org.jkiss.dbeaver.ext.mssql.model.SQLServerSchema"
label=
"%tree.schemas.node.name"
icon=
"#folder_schema"
description=
"Schemas"
>
<items
label=
"%tree.schema.node.name"
path=
"schema"
property=
"schemas"
icon=
"#schema"
>
<icon
if=
"object.system"
icon=
"#schema_system"
/>
<folder
type=
"org.jkiss.dbeaver.ext.mssql.model.SQLServerTable"
label=
"%tree.tables.node.name"
icon=
"#folder_table"
description=
"Tables"
>
<items
label=
"%tree.table.node.name"
path=
"table"
property=
"tables"
icon=
"#table"
>
<icon
if=
"object.system"
icon=
"#table_system"
/>
<folder
type=
"org.jkiss.dbeaver.ext.mssql.model.SQLServerTableColumn"
label=
"%tree.columns.node.name"
icon=
"#columns"
description=
"Table columns"
>
<items
label=
"%tree.column.node.name"
path=
"attribute"
property=
"attributes"
icon=
"#column"
>
</items>
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/SQLServerConstants.java
浏览文件 @
64838cf4
...
...
@@ -60,6 +60,7 @@ public class SQLServerConstants {
public
static
final
String
SQL_SERVER_SYSTEM_SCHEMA
=
"sys"
;
public
static
final
String
SYBASE_SYSTEM_SCHEMA
=
"dbo"
;
public
static
final
String
INFORMATION_SCHEMA_SCHEMA
=
"information_schema"
;
public
static
final
DBSIndexType
INDEX_TYPE_HEAP
=
new
DBSIndexType
(
"HEAP"
,
SQLServerMessages
.
index_type_Heap
);
//$NON-NLS-1$
public
static
final
DBSIndexType
INDEX_TYPE_NON_CLUSTERED
=
new
DBSIndexType
(
"NON_CLUSTERED"
,
SQLServerMessages
.
index_type_NonClustered
);
//$NON-NLS-1$
...
...
@@ -68,4 +69,5 @@ public class SQLServerConstants {
public
static
final
String
SYS_TABLE_EXTENDED_PROPERTIES
=
"extended_properties"
;
public
static
final
String
PROP_MS_DESCRIPTION
=
"MS_Description"
;
}
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerSchema.java
浏览文件 @
64838cf4
...
...
@@ -155,7 +155,9 @@ public class SQLServerSchema implements DBSSchema, DBPSaveableObject, DBPQualifi
@Override
public
boolean
isSystem
()
{
return
name
.
equals
(
"msdb"
);
return
name
.
equalsIgnoreCase
(
SQLServerConstants
.
SQL_SERVER_SYSTEM_SCHEMA
)
||
name
.
equalsIgnoreCase
(
SQLServerConstants
.
INFORMATION_SCHEMA_SCHEMA
);
}
@Override
...
...
@@ -292,7 +294,7 @@ public class SQLServerSchema implements DBSSchema, DBPSaveableObject, DBPQualifi
throws
SQLException
,
DBException
{
String
type
=
JDBCUtils
.
safeGetStringTrimmed
(
dbResult
,
"type"
);
if
(
"U"
.
equals
(
type
)
||
"S"
.
equals
(
type
))
{
if
(
SQLServerObjectType
.
U
.
name
().
equals
(
type
)
||
SQLServerObjectType
.
S
.
name
()
.
equals
(
type
))
{
return
new
SQLServerTable
(
owner
,
dbResult
);
}
else
{
return
new
SQLServerView
(
owner
,
dbResult
);
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTable.java
浏览文件 @
64838cf4
...
...
@@ -59,7 +59,7 @@ public class SQLServerTable extends SQLServerTableBase implements DBPScriptObjec
}
// Copy constructor
public
SQLServerTable
(
DBRProgressMonitor
monitor
,
SQLServerSchema
schema
,
DBSEntity
source
)
throws
DBException
{
public
SQLServerTable
(
DBRProgressMonitor
monitor
,
SQLServerSchema
schema
,
SQLServerTable
source
)
throws
DBException
{
super
(
monitor
,
schema
,
source
);
DBSObjectCache
<
SQLServerTableBase
,
SQLServerTableColumn
>
colCache
=
getContainer
().
getTableCache
().
getChildrenCache
(
this
);
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTableBase.java
浏览文件 @
64838cf4
...
...
@@ -19,10 +19,7 @@ package org.jkiss.dbeaver.ext.mssql.model;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.DBPNamedObject2
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.*
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
import
org.jkiss.dbeaver.model.impl.AbstractExecutionSource
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
...
...
@@ -43,13 +40,14 @@ import java.util.*;
* MySQLTable base
*/
public
abstract
class
SQLServerTableBase
extends
JDBCTable
<
SQLServerDataSource
,
SQLServerSchema
>
implements
SQLServerObject
,
DBPNamedObject2
,
DBPRefreshableObject
implements
SQLServerObject
,
DBPNamedObject2
,
DBPRefreshableObject
,
DBPSystemObject
{
private
static
final
Log
log
=
Log
.
getLog
(
SQLServerTableBase
.
class
);
private
static
final
String
CAT_STATISTICS
=
"Statistics"
;
private
long
objectId
;
private
String
type
;
private
String
description
;
private
Long
rowCount
;
...
...
@@ -59,7 +57,7 @@ public abstract class SQLServerTableBase extends JDBCTable<SQLServerDataSource,
}
// Copy constructor
protected
SQLServerTableBase
(
DBRProgressMonitor
monitor
,
SQLServerSchema
catalog
,
DBSEntity
source
)
throws
DBException
{
protected
SQLServerTableBase
(
DBRProgressMonitor
monitor
,
SQLServerSchema
catalog
,
SQLServerTableBase
source
)
throws
DBException
{
super
(
catalog
,
source
,
false
);
}
...
...
@@ -71,6 +69,7 @@ public abstract class SQLServerTableBase extends JDBCTable<SQLServerDataSource,
this
.
objectId
=
JDBCUtils
.
safeGetLong
(
dbResult
,
"object_id"
);
this
.
description
=
JDBCUtils
.
safeGetString
(
dbResult
,
"description"
);
this
.
type
=
JDBCUtils
.
safeGetStringTrimmed
(
dbResult
,
"type"
);
}
public
SQLServerDatabase
getDatabase
()
{
...
...
@@ -93,6 +92,16 @@ public abstract class SQLServerTableBase extends JDBCTable<SQLServerDataSource,
return
objectId
;
}
@Property
(
order
=
6
)
public
String
getType
()
{
return
type
;
}
@Override
public
boolean
isSystem
()
{
return
SQLServerObjectType
.
S
.
name
().
equals
(
type
);
}
@Override
@Property
(
viewable
=
true
,
editable
=
true
,
updatable
=
true
,
multiline
=
true
,
order
=
100
)
public
String
getDescription
()
{
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerView.java
浏览文件 @
64838cf4
...
...
@@ -57,7 +57,7 @@ public class SQLServerView extends SQLServerTableBase implements DBPScriptObject
}
// Copy constructor
public
SQLServerView
(
DBRProgressMonitor
monitor
,
SQLServerSchema
schema
,
DBSEntity
source
)
throws
DBException
{
public
SQLServerView
(
DBRProgressMonitor
monitor
,
SQLServerSchema
schema
,
SQLServerView
source
)
throws
DBException
{
super
(
monitor
,
schema
,
source
);
}
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBIcon.java
浏览文件 @
64838cf4
...
...
@@ -51,6 +51,7 @@ public class DBIcon implements DBPImage
public
static
final
DBIcon
TREE_TABLE_ALIAS
=
new
DBIcon
(
"table_alias"
,
"tree/table_alias.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
public
static
final
DBIcon
TREE_TABLE_LINK
=
new
DBIcon
(
"table_link"
,
"tree/table_link.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
public
static
final
DBIcon
TREE_TABLE_INDEX
=
new
DBIcon
(
"table_index"
,
"tree/table_index.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
public
static
final
DBIcon
TREE_TABLE_SYSTEM
=
new
DBIcon
(
"table_system"
,
"tree/table_index.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
public
static
final
DBIcon
TREE_VIEW
=
new
DBIcon
(
"view"
,
"tree/view.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
public
static
final
DBIcon
TREE_FUNCTION
=
new
DBIcon
(
"function"
,
"tree/function.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
public
static
final
DBIcon
TREE_PROCEDURE
=
new
DBIcon
(
"procedure"
,
"tree/procedure.png"
);
//$NON-NLS-1$ //$NON-NLS-2$
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录