Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
da5507a5
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,发现更多精彩内容 >>
提交
da5507a5
编写于
5月 05, 2021
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Properties model refactoring
Former-commit-id:
10b7015b
上级
2f30b154
变更
41
隐藏空白更改
内联
并排
Showing
41 changed file
with
270 addition
and
225 deletion
+270
-225
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/database/DatabaseTransferProducer.java
...ver/tools/transfer/database/DatabaseTransferProducer.java
+1
-1
plugins/org.jkiss.dbeaver.ext.clickhouse/src/org/jkiss/dbeaver/ext/clickhouse/model/ClickhouseTable.java
...g/jkiss/dbeaver/ext/clickhouse/model/ClickhouseTable.java
+7
-6
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/DB2Constants.java
...r.ext.db2/src/org/jkiss/dbeaver/ext/db2/DB2Constants.java
+0
-1
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2DataSource.java
...b2/src/org/jkiss/dbeaver/ext/db2/model/DB2DataSource.java
+1
-1
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Index.java
...ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Index.java
+8
-7
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Table.java
...ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Table.java
+6
-5
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableCheckConstraint.java
.../jkiss/dbeaver/ext/db2/model/DB2TableCheckConstraint.java
+2
-1
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableColumn.java
...2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableColumn.java
+10
-9
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TablePartition.java
...rc/org/jkiss/dbeaver/ext/db2/model/DB2TablePartition.java
+6
-5
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TablespaceContainer.java
...g/jkiss/dbeaver/ext/db2/model/DB2TablespaceContainer.java
+3
-3
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/fed/DB2Nickname.java
.../src/org/jkiss/dbeaver/ext/db2/model/fed/DB2Nickname.java
+6
-5
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/plan/DB2PlanObject.java
...c/org/jkiss/dbeaver/ext/db2/model/plan/DB2PlanObject.java
+17
-16
plugins/org.jkiss.dbeaver.ext.exasol/src/org/jkiss/dbeaver/ext/exasol/ExasolConstants.java
...sol/src/org/jkiss/dbeaver/ext/exasol/ExasolConstants.java
+1
-1
plugins/org.jkiss.dbeaver.ext.exasol/src/org/jkiss/dbeaver/ext/exasol/model/ExasolTable.java
...l/src/org/jkiss/dbeaver/ext/exasol/model/ExasolTable.java
+5
-9
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/model/GenericTableBase.java
...org/jkiss/dbeaver/ext/generic/model/GenericTableBase.java
+1
-1
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerDataSource.java
...rg/jkiss/dbeaver/ext/mssql/model/SQLServerDataSource.java
+2
-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
+4
-7
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTableBase.java
...org/jkiss/dbeaver/ext/mssql/model/SQLServerTableBase.java
+1
-1
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/generic/SQLServerGenericDataSource.java
...r/ext/mssql/model/generic/SQLServerGenericDataSource.java
+3
-3
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/session/SQLServerSession.java
...iss/dbeaver/ext/mssql/model/session/SQLServerSession.java
+8
-8
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLDataSource.java
...rc/org/jkiss/dbeaver/ext/mysql/model/MySQLDataSource.java
+1
-1
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLEvent.java
...sql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLEvent.java
+4
-5
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLPartition.java
...src/org/jkiss/dbeaver/ext/mysql/model/MySQLPartition.java
+12
-13
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLTable.java
...sql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLTable.java
+12
-12
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleDataSource.java
.../org/jkiss/dbeaver/ext/oracle/model/OracleDataSource.java
+1
-1
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleSchedulerJob.java
...rg/jkiss/dbeaver/ext/oracle/model/OracleSchedulerJob.java
+7
-8
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleTable.java
...e/src/org/jkiss/dbeaver/ext/oracle/model/OracleTable.java
+23
-20
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleTablePhysical.java
...g/jkiss/dbeaver/ext/oracle/model/OracleTablePhysical.java
+3
-2
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/session/OracleServerSession.java
...dbeaver/ext/oracle/model/session/OracleServerSession.java
+0
-1
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreDataSource.java
...jkiss/dbeaver/ext/postgresql/model/PostgreDataSource.java
+2
-2
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreProcedure.java
.../jkiss/dbeaver/ext/postgresql/model/PostgreProcedure.java
+2
-3
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableReal.java
.../jkiss/dbeaver/ext/postgresql/model/PostgreTableReal.java
+5
-4
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBConstants.java
...beaver.model/src/org/jkiss/dbeaver/model/DBConstants.java
+37
-25
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBPDataSource.java
...aver.model/src/org/jkiss/dbeaver/model/DBPDataSource.java
+14
-0
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBUtils.java
...ss.dbeaver.model/src/org/jkiss/dbeaver/model/DBUtils.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTable.java
...c/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTable.java
+0
-2
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/sql/AbstractSQLDialect.java
.../org/jkiss/dbeaver/model/impl/sql/AbstractSQLDialect.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/runtime/properties/ObjectPropertyDescriptor.java
.../dbeaver/runtime/properties/ObjectPropertyDescriptor.java
+34
-30
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/controls/PropertyPageStandard.java
...c/org/jkiss/dbeaver/ui/controls/PropertyPageStandard.java
+1
-0
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertyDescriptorDelegate.java
...iss/dbeaver/ui/properties/PropertyDescriptorDelegate.java
+12
-1
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertySourceDelegate.java
...g/jkiss/dbeaver/ui/properties/PropertySourceDelegate.java
+6
-1
未找到文件。
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/database/DatabaseTransferProducer.java
浏览文件 @
da5507a5
...
...
@@ -168,7 +168,7 @@ public class DatabaseTransferProducer implements IDataTransferProducer<DatabaseP
}
boolean
newConnection
=
settings
.
isOpenNewConnections
()
&&
!
getDatabaseObject
().
getDataSource
().
getContainer
().
getDriver
().
isEmbedded
();
boolean
forceDataReadTransactions
=
Boolean
.
TRUE
.
equals
(
dataSource
.
getDataSourceFeature
(
DB
Constants
.
FEATURE_LOB_REQUIRE_TRANSACTIONS
));
boolean
forceDataReadTransactions
=
Boolean
.
TRUE
.
equals
(
dataSource
.
getDataSourceFeature
(
DB
PDataSource
.
FEATURE_LOB_REQUIRE_TRANSACTIONS
));
boolean
selectiveExportFromUI
=
settings
.
isSelectedColumnsOnly
()
||
settings
.
isSelectedRowsOnly
();
try
{
...
...
plugins/org.jkiss.dbeaver.ext.clickhouse/src/org/jkiss/dbeaver/ext/clickhouse/model/ClickhouseTable.java
浏览文件 @
da5507a5
...
...
@@ -20,6 +20,7 @@ import org.jkiss.code.Nullable;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.ext.generic.model.GenericStructContainer
;
import
org.jkiss.dbeaver.ext.generic.model.GenericTable
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPObjectStatistics
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
...
...
@@ -58,13 +59,13 @@ public class ClickhouseTable extends GenericTable implements DBPObjectStatistics
return
tableSize
!=
null
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
true
,
order
=
20
,
formatter
=
ByteNumberFormat
.
class
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
true
,
order
=
20
,
formatter
=
ByteNumberFormat
.
class
)
@Override
public
long
getStatObjectSize
()
{
return
tableSize
==
null
?
0
:
tableSize
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
true
,
order
=
21
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
true
,
order
=
21
)
@Nullable
@Override
public
synchronized
Long
getRowCount
(
DBRProgressMonitor
monitor
)
{
...
...
@@ -72,25 +73,25 @@ public class ClickhouseTable extends GenericTable implements DBPObjectStatistics
return
tableRows
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
22
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
22
)
public
Date
getLastModifyTime
(
DBRProgressMonitor
monitor
)
{
readStatistics
(
monitor
);
return
lastModifyTime
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
23
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
23
)
public
String
getMinDate
(
DBRProgressMonitor
monitor
)
{
readStatistics
(
monitor
);
return
minDate
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
24
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
24
)
public
String
getMaxDate
(
DBRProgressMonitor
monitor
)
{
readStatistics
(
monitor
);
return
maxDate
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
true
,
order
=
25
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
true
,
order
=
25
)
public
String
getEngine
(
DBRProgressMonitor
monitor
)
{
readStatistics
(
monitor
);
return
engine
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/DB2Constants.java
浏览文件 @
da5507a5
...
...
@@ -92,7 +92,6 @@ public class DB2Constants {
public
static
final
String
CAT_PERFORMANCE
=
"Performance"
;
public
static
final
String
CAT_REMOTE
=
"Remote"
;
public
static
final
String
CAT_TEMPORAL
=
"Temporal"
;
public
static
final
String
CAT_STATS
=
"Statistics"
;
public
static
final
String
CAT_TABLESPACE
=
"Tablespace"
;
public
static
final
String
PLAN_COST_FORMAT
=
"###,###,###,##0.000"
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2DataSource.java
浏览文件 @
da5507a5
...
...
@@ -133,7 +133,7 @@ public class DB2DataSource extends JDBCDataSource implements DBCQueryPlanner, IA
@Override
public
Object
getDataSourceFeature
(
String
featureId
)
{
switch
(
featureId
)
{
case
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
:
case
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
:
return
32764
;
}
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Index.java
浏览文件 @
da5507a5
...
...
@@ -26,6 +26,7 @@ import org.jkiss.dbeaver.ext.db2.model.dict.DB2IndexPageSplit;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2IndexType
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2UniqueRule
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2YesNo
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.impl.DBObjectNameCaseTransformer
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
...
...
@@ -270,43 +271,43 @@ public class DB2Index extends JDBCTableIndex<DB2Schema, DB2TableBase> {
return
createTime
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
30
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
30
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Timestamp
getStatsTime
()
{
return
statsTime
;
}
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
31
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
31
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFullKeycard
()
{
return
fullKeycard
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
32
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
32
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirstKeycard
()
{
return
firstKeycard
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
33
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
33
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirst2Keycard
()
{
return
first2Keycard
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
34
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
34
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirst3Keycard
()
{
return
first3Keycard
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
35
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
35
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirst4Keycard
()
{
return
first4Keycard
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
36
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
order
=
36
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getClusterRatio
()
{
return
clusterRatio
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2Table.java
浏览文件 @
da5507a5
...
...
@@ -27,6 +27,7 @@ import org.jkiss.dbeaver.ext.db2.editors.DB2SourceObject;
import
org.jkiss.dbeaver.ext.db2.editors.DB2TableTablespaceListProvider
;
import
org.jkiss.dbeaver.ext.db2.model.cache.DB2TableTriggerCache
;
import
org.jkiss.dbeaver.ext.db2.model.dict.*
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.data.DBDPseudoAttribute
;
...
...
@@ -328,7 +329,7 @@ public class DB2Table extends DB2TableBase
return
super
.
getName
();
}
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
3
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
3
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getCard
()
{
return
card
;
...
...
@@ -379,25 +380,25 @@ public class DB2Table extends DB2TableBase
this
.
longTablespace
=
longTablespace
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Timestamp
getStatsTime
()
{
return
statsTime
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getnPages
()
{
return
nPages
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getfPages
()
{
return
fPages
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getOverFLow
()
{
return
overFLow
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableCheckConstraint.java
浏览文件 @
da5507a5
...
...
@@ -23,6 +23,7 @@ import org.jkiss.dbeaver.ext.db2.DB2Constants;
import
org.jkiss.dbeaver.ext.db2.editors.DB2SourceObject
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2OwnerType
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TableCheckConstraintType
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
...
...
@@ -203,7 +204,7 @@ public class DB2TableCheckConstraint extends JDBCTableConstraint<DB2Table> imple
return
fumcPath
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getPrecentValid
()
{
return
precentValid
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TableColumn.java
浏览文件 @
da5507a5
...
...
@@ -27,6 +27,7 @@ import org.jkiss.dbeaver.ext.db2.model.dict.DB2ColumnHiddenState;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TableColumnCompression
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TableColumnGenerated
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2YesNo
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPDataKind
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.DBPHiddenObject
;
...
...
@@ -399,55 +400,55 @@ public class DB2TableColumn extends JDBCTableColumn<DB2TableBase>
return
transactionStartId
;
}
@Property
(
viewable
=
false
,
order
=
150
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
150
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getColcard
()
{
return
colcard
;
}
@Property
(
viewable
=
false
,
order
=
152
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
152
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getAvgLength
()
{
return
avgLength
;
}
@Property
(
viewable
=
false
,
order
=
153
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
153
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
String
getLow2key
()
{
return
low2key
;
}
@Property
(
viewable
=
false
,
order
=
154
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
154
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
String
getHigh2key
()
{
return
high2key
;
}
@Property
(
viewable
=
false
,
order
=
155
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
155
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getPctInlined
()
{
return
pctInlined
;
}
@Property
(
viewable
=
false
,
order
=
156
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
156
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getPctEncoded
()
{
return
pctEncoded
;
}
@Property
(
viewable
=
false
,
order
=
157
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
157
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getNbQuantiles
()
{
return
nbQuantiles
;
}
@Property
(
viewable
=
false
,
order
=
158
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
158
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getNbMostFreq
()
{
return
nbMostFreq
;
}
@Property
(
viewable
=
false
,
order
=
159
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
159
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getNbNulls
()
{
return
nbNulls
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TablePartition.java
浏览文件 @
da5507a5
...
...
@@ -24,6 +24,7 @@ import org.jkiss.dbeaver.ext.db2.DB2Utils;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TablePartitionAccessMode
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TablePartitionStatus
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2YesNo
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.meta.Property
;
import
org.jkiss.dbeaver.model.runtime.VoidProgressMonitor
;
...
...
@@ -191,31 +192,31 @@ public class DB2TablePartition extends DB2Object<DB2Table> implements DBSTablePa
return
highValue
;
}
@Property
(
viewable
=
false
,
order
=
20
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
20
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Timestamp
getStatsTime
()
{
return
statsTime
;
}
@Property
(
viewable
=
false
,
order
=
21
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
21
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getCard
()
{
return
card
;
}
@Property
(
viewable
=
false
,
order
=
22
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
22
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getnPages
()
{
return
nPages
;
}
@Property
(
viewable
=
false
,
order
=
23
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
23
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getfPages
()
{
return
fPages
;
}
@Property
(
viewable
=
false
,
order
=
24
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
order
=
24
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getOverFLow
()
{
return
overFLow
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/DB2TablespaceContainer.java
浏览文件 @
da5507a5
...
...
@@ -18,7 +18,7 @@
package
org.jkiss.dbeaver.ext.db2.model
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.
ext.db2.DB2
Constants
;
import
org.jkiss.dbeaver.
model.DB
Constants
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.meta.Property
;
...
...
@@ -83,13 +83,13 @@ public class DB2TablespaceContainer extends DB2Object<DB2Tablespace> {
return
containerType
;
}
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
4
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
4
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getTotalPages
()
{
return
totalPages
;
}
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
5
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
true
,
editable
=
false
,
order
=
5
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getUsablePages
()
{
return
usablePages
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/fed/DB2Nickname.java
浏览文件 @
da5507a5
...
...
@@ -29,6 +29,7 @@ import org.jkiss.dbeaver.ext.db2.model.dict.DB2TableAccessMode;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TablePartitionMode
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2TableStatus
;
import
org.jkiss.dbeaver.ext.db2.model.dict.DB2YesNo
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPNamedObject2
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
...
...
@@ -176,31 +177,31 @@ public class DB2Nickname extends DB2TableBase implements DBPNamedObject2, DBPRef
return
cachingAllowed
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getCard
()
{
return
card
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Timestamp
getStatsTime
()
{
return
statsTime
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getnPages
()
{
return
nPages
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getfPages
()
{
return
fPages
;
}
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
viewable
=
false
,
editable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getOverFLow
()
{
return
overFLow
;
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/model/plan/DB2PlanObject.java
浏览文件 @
da5507a5
...
...
@@ -18,6 +18,7 @@
package
org.jkiss.dbeaver.ext.db2.model.plan
;
import
org.jkiss.dbeaver.ext.db2.DB2Constants
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanCostNode
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
...
...
@@ -243,7 +244,7 @@ public class DB2PlanObject extends DB2PlanNode implements DBCPlanCostNode {
return
createTime
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Timestamp
getStatsTime
()
{
return
statsTime
;
...
...
@@ -285,91 +286,91 @@ public class DB2PlanObject extends DB2PlanNode implements DBCPlanCostNode {
return
extentSize
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getPages
()
{
return
pages
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Double
getOverHead
()
{
return
overHead
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Double
getTransferRate
()
{
return
transferRate
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Double
getCluster
()
{
return
cluster
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getnLeaf
()
{
return
nLeaf
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getnLevels
()
{
return
nLevels
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getOverFlow
()
{
return
overFlow
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFullKeyCard
()
{
return
fullKeyCard
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirstKeyCard
()
{
return
firstKeyCard
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirst2KeyCard
()
{
return
first2KeyCard
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirst3KeyCard
()
{
return
first3KeyCard
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getFirst4KeyCard
()
{
return
first4KeyCard
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Long
getSequentialPages
()
{
return
sequentialPages
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
Integer
getDensity
()
{
return
density
;
}
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
2Constants
.
CAT_STAT
S
)
@Property
(
editable
=
false
,
viewable
=
false
,
category
=
DB
Constants
.
CAT_STATISTIC
S
)
public
String
getStatsSrc
()
{
return
statsSrc
;
...
...
plugins/org.jkiss.dbeaver.ext.exasol/src/org/jkiss/dbeaver/ext/exasol/ExasolConstants.java
浏览文件 @
da5507a5
...
...
@@ -35,7 +35,7 @@ public class ExasolConstants {
public
static
final
String
CAT_OWNER
=
"Owner"
;
public
static
final
String
CAT_SOURCE
=
"Source"
;
public
static
final
String
CAT_PERFORMANCE
=
"Performance"
;
public
static
final
String
CAT_STATS
=
"Statistics"
;
public
static
final
String
DRV_CLIENT_NAME
=
"clientname"
;
public
static
final
String
DRV_CLIENT_VERSION
=
"clientversion"
;
public
static
final
String
DRV_QUERYTIMEOUT
=
"querytimeout"
;
...
...
plugins/org.jkiss.dbeaver.ext.exasol/src/org/jkiss/dbeaver/ext/exasol/model/ExasolTable.java
浏览文件 @
da5507a5
...
...
@@ -20,17 +20,13 @@ package org.jkiss.dbeaver.ext.exasol.model;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.ext.exasol.ExasolConstants
;
import
org.jkiss.dbeaver.ext.exasol.ExasolMessages
;
import
org.jkiss.dbeaver.ext.exasol.ExasolSysTablePrefix
;
import
org.jkiss.dbeaver.ext.exasol.model.cache.ExasolTableForeignKeyCache
;
import
org.jkiss.dbeaver.ext.exasol.model.cache.ExasolTableIndexCache
;
import
org.jkiss.dbeaver.ext.exasol.model.cache.ExasolTablePartitionColumnCache
;
import
org.jkiss.dbeaver.ext.exasol.tools.ExasolUtils
;
import
org.jkiss.dbeaver.model.DBPNamedObject2
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBPScriptObject
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.*
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet
;
...
...
@@ -108,22 +104,22 @@ public class ExasolTable extends ExasolTableBase implements DBPRefreshableObject
return
createTime
;
}
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
150
,
category
=
ExasolConstants
.
CAT_STAT
S
,
formatter
=
ByteNumberFormat
.
class
)
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
150
,
category
=
DBConstants
.
CAT_STATISTIC
S
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getRawsize
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
return
sizeRaw
;
}
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
200
,
category
=
ExasolConstants
.
CAT_STAT
S
,
formatter
=
ByteNumberFormat
.
class
)
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
200
,
category
=
DBConstants
.
CAT_STATISTIC
S
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getCompressedsize
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
return
sizeCompressed
;
}
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
250
,
category
=
ExasolConstants
.
CAT_STAT
S
)
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
250
,
category
=
DBConstants
.
CAT_STATISTIC
S
)
public
float
getDeletePercentage
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
return
this
.
deletePercentage
;
}
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
300
,
category
=
ExasolConstants
.
CAT_STAT
S
)
@Property
(
viewable
=
true
,
expensive
=
false
,
editable
=
false
,
order
=
300
,
category
=
DBConstants
.
CAT_STATISTIC
S
)
public
long
getTableCount
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
return
this
.
tablecount
;
}
...
...
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/model/GenericTableBase.java
浏览文件 @
da5507a5
...
...
@@ -248,7 +248,7 @@ public abstract class GenericTableBase extends JDBCTable<GenericDataSource, Gene
// Comment row count calculation - it works too long and takes a lot of resources without serious reason
@Nullable
@Property
(
viewable
=
false
,
expensive
=
true
,
order
=
5
,
category
=
CAT_STATISTICS
)
@Property
(
viewable
=
false
,
expensive
=
true
,
order
=
5
,
category
=
DBConstants
.
CAT_STATISTICS
)
public
Long
getRowCount
(
DBRProgressMonitor
monitor
)
{
if
(
rowCount
!=
null
)
{
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerDataSource.java
浏览文件 @
da5507a5
...
...
@@ -206,9 +206,9 @@ public class SQLServerDataSource extends JDBCDataSource implements DBSInstanceCo
@Override
public
Object
getDataSourceFeature
(
String
featureId
)
{
switch
(
featureId
)
{
case
DB
Constants
.
FEATURE_LIMIT_AFFECTS_DML
:
case
DB
PDataSource
.
FEATURE_LIMIT_AFFECTS_DML
:
return
true
;
case
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
:
case
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
:
return
8000
;
}
return
super
.
getDataSourceFeature
(
featureId
);
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTable.java
浏览文件 @
da5507a5
...
...
@@ -21,6 +21,7 @@ import org.jkiss.code.Nullable;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.ext.mssql.SQLServerUtils
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPObjectStatistics
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
...
...
@@ -35,12 +36,9 @@ import org.jkiss.dbeaver.model.meta.Property;
import
org.jkiss.dbeaver.model.preferences.DBPPropertySource
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.struct.DBSEntityAssociation
;
import
org.jkiss.dbeaver.model.struct.DBSEntityAttribute
;
import
org.jkiss.dbeaver.model.struct.DBSObject
;
import
org.jkiss.dbeaver.model.struct.DBStructUtils
;
import
org.jkiss.dbeaver.model.struct.cache.DBSObjectCache
;
import
org.jkiss.dbeaver.model.struct.rdb.DBSCheckConstraintContainer
;
import
org.jkiss.utils.CommonUtils
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
...
...
@@ -48,7 +46,6 @@ import java.util.ArrayList;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* SQLServerTable
...
...
@@ -80,20 +77,20 @@ public class SQLServerTable extends SQLServerTableBase implements DBPObjectStati
return
false
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
30
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
30
)
@Override
public
Long
getRowCount
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
readTableStats
(
monitor
);
return
super
.
getRowCount
(
monitor
);
}
@Property
(
viewable
=
true
,
category
=
CAT_STATISTICS
,
order
=
31
)
@Property
(
viewable
=
true
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
31
)
public
long
getTotalBytes
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
readTableStats
(
monitor
);
return
totalBytes
;
}
@Property
(
viewable
=
true
,
category
=
CAT_STATISTICS
,
order
=
32
)
@Property
(
viewable
=
true
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
32
)
public
long
getUsedBytes
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
readTableStats
(
monitor
);
return
usedBytes
;
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerTableBase.java
浏览文件 @
da5507a5
...
...
@@ -181,7 +181,7 @@ public abstract class SQLServerTableBase extends JDBCTable<SQLServerDataSource,
return
null
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
23
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
23
)
public
Long
getRowCount
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
if
(
rowCount
!=
null
||
!
isPersisted
())
{
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/generic/SQLServerGenericDataSource.java
浏览文件 @
da5507a5
...
...
@@ -23,8 +23,8 @@ import org.jkiss.dbeaver.ext.generic.model.GenericDataSource;
import
org.jkiss.dbeaver.ext.mssql.SQLServerConstants
;
import
org.jkiss.dbeaver.ext.mssql.SQLServerUtils
;
import
org.jkiss.dbeaver.ext.mssql.model.SQLServerDialect
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPDataKind
;
import
org.jkiss.dbeaver.model.DBPDataSource
;
import
org.jkiss.dbeaver.model.DBPDataSourceContainer
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration
;
...
...
@@ -70,9 +70,9 @@ public class SQLServerGenericDataSource extends GenericDataSource {
@Override
public
Object
getDataSourceFeature
(
String
featureId
)
{
switch
(
featureId
)
{
case
DB
Constants
.
FEATURE_LIMIT_AFFECTS_DML
:
case
DB
PDataSource
.
FEATURE_LIMIT_AFFECTS_DML
:
return
true
;
case
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
:
case
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
:
return
8000
;
}
return
super
.
getDataSourceFeature
(
featureId
);
...
...
plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/session/SQLServerSession.java
浏览文件 @
da5507a5
...
...
@@ -16,6 +16,7 @@
*/
package
org.jkiss.dbeaver.ext.mssql.model.session
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.admin.sessions.AbstractServerSession
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.meta.Property
;
...
...
@@ -29,7 +30,6 @@ import java.util.Date;
public
class
SQLServerSession
extends
AbstractServerSession
{
private
static
final
String
CAT_CLIENT
=
"Client"
;
private
static
final
String
CAT_TIMING
=
"Timings"
;
private
static
final
String
CAT_STATISTICS
=
"Statistics"
;
private
long
id
;
...
...
@@ -165,37 +165,37 @@ public class SQLServerSession extends AbstractServerSession {
return
ntUserName
;
}
@Property
(
viewable
=
true
,
category
=
CAT_STATISTICS
,
order
=
40
)
@Property
(
viewable
=
true
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
40
)
public
long
getCpuTime
()
{
return
cpuTime
;
}
@Property
(
viewable
=
true
,
category
=
CAT_STATISTICS
,
order
=
41
)
@Property
(
viewable
=
true
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
41
)
public
long
getMemoryUsage
()
{
return
memoryUsage
;
}
@Property
(
viewable
=
false
,
category
=
CAT_STATISTICS
,
order
=
42
)
@Property
(
viewable
=
false
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
42
)
public
long
getTotalScheduledTime
()
{
return
totalScheduledTime
;
}
@Property
(
viewable
=
false
,
category
=
CAT_STATISTICS
,
order
=
43
)
@Property
(
viewable
=
false
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
43
)
public
long
getTotalElapsedTime
()
{
return
totalElapsedTime
;
}
@Property
(
viewable
=
true
,
category
=
CAT_STATISTICS
,
order
=
44
)
@Property
(
viewable
=
true
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
44
)
public
long
getReadsNum
()
{
return
readsNum
;
}
@Property
(
viewable
=
true
,
category
=
CAT_STATISTICS
,
order
=
45
)
@Property
(
viewable
=
true
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
45
)
public
long
getWritesNum
()
{
return
writesNum
;
}
@Property
(
viewable
=
false
,
category
=
CAT_STATISTICS
,
order
=
46
)
@Property
(
viewable
=
false
,
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
46
)
public
long
getRowCount
()
{
return
rowCount
;
}
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLDataSource.java
浏览文件 @
da5507a5
...
...
@@ -95,7 +95,7 @@ public class MySQLDataSource extends JDBCDataSource implements DBPObjectStatisti
@Override
public
Object
getDataSourceFeature
(
String
featureId
)
{
switch
(
featureId
)
{
case
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
:
case
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
:
if
(
isServerVersionAtLeast
(
5
,
0
))
{
return
65535
;
}
else
{
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLEvent.java
浏览文件 @
da5507a5
...
...
@@ -41,7 +41,6 @@ import java.util.Map;
public
class
MySQLEvent
implements
MySQLSourceObject
,
DBPSaveableObject
,
DBPQualifiedObject
{
private
static
final
String
CAT_DETAILS
=
"Details"
;
private
static
final
String
CAT_STATS
=
"Statistics"
;
private
MySQLCatalog
catalog
;
private
boolean
persisted
;
...
...
@@ -199,7 +198,7 @@ public class MySQLEvent implements MySQLSourceObject, DBPSaveableObject, DBPQual
return
ends
;
}
@Property
(
category
=
CAT_STAT
S
,
order
=
35
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
order
=
35
)
public
String
getStatus
()
{
return
status
;
}
...
...
@@ -209,17 +208,17 @@ public class MySQLEvent implements MySQLSourceObject, DBPSaveableObject, DBPQual
return
onCompletion
;
}
@Property
(
category
=
CAT_STAT
S
,
order
=
37
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
order
=
37
)
public
Date
getCreated
()
{
return
created
;
}
@Property
(
category
=
CAT_STAT
S
,
order
=
38
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
order
=
38
)
public
Date
getLastAltered
()
{
return
lastAltered
;
}
@Property
(
category
=
CAT_STAT
S
,
order
=
39
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
order
=
39
)
public
Date
getLastExecuted
()
{
return
lastExecuted
;
}
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLPartition.java
浏览文件 @
da5507a5
...
...
@@ -19,6 +19,7 @@ package org.jkiss.dbeaver.ext.mysql.model;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.ext.mysql.MySQLConstants
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCTableObject
;
import
org.jkiss.dbeaver.model.meta.Property
;
...
...
@@ -34,9 +35,7 @@ import java.util.List;
/**
* MySQLPartition
*/
public
class
MySQLPartition
extends
JDBCTableObject
<
MySQLTable
>
implements
DBSTablePartition
{
private
static
final
String
CAT_STATS
=
"Statistics"
;
public
class
MySQLPartition
extends
JDBCTableObject
<
MySQLTable
>
implements
DBSTablePartition
{
private
MySQLPartition
parent
;
private
List
<
MySQLPartition
>
subPartitions
;
...
...
@@ -179,61 +178,61 @@ public class MySQLPartition extends JDBCTableObject<MySQLTable> implements DBSTa
return
nodegroup
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
6
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
6
)
public
long
getTableRows
()
{
return
tableRows
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
7
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
7
)
public
long
getAvgRowLength
()
{
return
avgRowLength
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
8
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
8
)
public
long
getDataLength
()
{
return
dataLength
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
9
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
9
)
public
long
getMaxDataLength
()
{
return
maxDataLength
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
10
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
10
)
public
long
getIndexLength
()
{
return
indexLength
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
11
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
11
)
public
long
getDataFree
()
{
return
dataFree
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
false
,
order
=
12
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
false
,
order
=
12
)
public
Date
getCreateTime
()
{
return
createTime
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
false
,
order
=
13
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
false
,
order
=
13
)
public
Date
getUpdateTime
()
{
return
updateTime
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
false
,
order
=
14
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
false
,
order
=
14
)
public
Date
getCheckTime
()
{
return
checkTime
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
true
,
order
=
15
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
true
,
order
=
15
)
public
long
getChecksum
()
{
return
checksum
;
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/model/MySQLTable.java
浏览文件 @
da5507a5
...
...
@@ -21,6 +21,7 @@ import org.jkiss.code.Nullable;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.ext.mysql.MySQLConstants
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.DBPObjectStatistics
;
import
org.jkiss.dbeaver.model.DBUtils
;
...
...
@@ -54,7 +55,6 @@ public class MySQLTable extends MySQLTableBase implements DBPObjectStatistics
private
static
final
Log
log
=
Log
.
getLog
(
MySQLTable
.
class
);
private
static
final
String
INNODB_COMMENT
=
"InnoDB free"
;
public
static
final
String
CATEGORY_STATISTICS
=
"Statistics"
;
public
static
class
AdditionalInfo
{
private
volatile
boolean
loaded
=
false
;
...
...
@@ -78,17 +78,17 @@ public class MySQLTable extends MySQLTableBase implements DBPObjectStatistics
@Property
(
viewable
=
false
,
editable
=
true
,
updatable
=
true
,
listProvider
=
CollationListProvider
.
class
,
order
=
6
)
public
MySQLCollation
getCollation
()
{
return
collation
;
}
@Property
(
viewable
=
true
,
editable
=
true
,
updatable
=
true
,
length
=
PropertyLength
.
MULTILINE
,
order
=
100
)
public
String
getDescription
()
{
return
description
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
10
)
public
long
getRowCount
()
{
return
rowCount
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
11
)
public
long
getAvgRowLength
()
{
return
avgRowLength
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
true
,
order
=
12
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getDataLength
()
{
return
dataLength
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
13
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getMaxDataLength
()
{
return
maxDataLength
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
14
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getDataFree
()
{
return
dataFree
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
15
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getIndexLength
()
{
return
indexLength
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
16
)
public
String
getRowFormat
()
{
return
rowFormat
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
20
)
public
Date
getCreateTime
()
{
return
createTime
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
21
)
public
Date
getUpdateTime
()
{
return
updateTime
;
}
@Property
(
category
=
CATEGORY
_STATISTICS
,
viewable
=
false
,
order
=
22
)
public
Date
getCheckTime
()
{
return
checkTime
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
10
)
public
long
getRowCount
()
{
return
rowCount
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
11
)
public
long
getAvgRowLength
()
{
return
avgRowLength
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
true
,
order
=
12
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getDataLength
()
{
return
dataLength
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
13
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getMaxDataLength
()
{
return
maxDataLength
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
14
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getDataFree
()
{
return
dataFree
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
15
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getIndexLength
()
{
return
indexLength
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
16
)
public
String
getRowFormat
()
{
return
rowFormat
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
20
)
public
Date
getCreateTime
()
{
return
createTime
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
21
)
public
Date
getUpdateTime
()
{
return
updateTime
;
}
@Property
(
category
=
DBConstants
.
CAT
_STATISTICS
,
viewable
=
false
,
order
=
22
)
public
Date
getCheckTime
()
{
return
checkTime
;
}
public
void
setEngine
(
MySQLEngine
engine
)
{
this
.
engine
=
engine
;
}
public
void
setAutoIncrement
(
long
autoIncrement
)
{
this
.
autoIncrement
=
autoIncrement
;
}
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleDataSource.java
浏览文件 @
da5507a5
...
...
@@ -93,7 +93,7 @@ public class OracleDataSource extends JDBCDataSource implements DBPObjectStatist
@Override
public
Object
getDataSourceFeature
(
String
featureId
)
{
switch
(
featureId
)
{
case
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
:
case
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
:
return
4000
;
}
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleSchedulerJob.java
浏览文件 @
da5507a5
...
...
@@ -48,7 +48,6 @@ import java.util.Map;
public
class
OracleSchedulerJob
extends
OracleSchemaObject
implements
OracleStatefulObject
,
DBPScriptObjectExt
{
private
static
final
String
CAT_SETTINGS
=
"Settings"
;
private
static
final
String
CAT_STATISTICS
=
"Statistics"
;
private
static
final
String
CAT_EVENTS
=
"Events"
;
private
static
final
String
CAT_ADVANCED
=
"Advanced"
;
...
...
@@ -339,37 +338,37 @@ public class OracleSchedulerJob extends OracleSchemaObject implements OracleStat
return
jobPriority
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
39
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
39
)
public
long
getRunCount
()
{
return
runCount
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
40
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
40
)
public
long
getMaxRuns
()
{
return
maxRuns
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
41
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
41
)
public
long
getFailureCount
()
{
return
failureCount
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
42
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
42
)
public
long
getMaxFailures
()
{
return
maxFailures
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
43
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
43
)
public
long
getRetryCount
()
{
return
retryCount
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
44
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
44
)
public
String
getLastStartDate
()
{
return
lastStartDate
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
45
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
45
)
public
String
getLastRunDuration
()
{
return
lastRunDuration
;
}
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleTable.java
浏览文件 @
da5507a5
...
...
@@ -42,7 +42,10 @@ import org.jkiss.utils.CommonUtils;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
/**
* OracleTable
...
...
@@ -81,41 +84,41 @@ public class OracleTable extends OracleTablePhysical implements DBPScriptObject,
private
int
avgSpaceFreelistBlocks
;
private
int
numFreelistBlocks
;
@Property
(
category
=
CAT_STATISTICS
,
order
=
31
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
31
)
public
int
getPctFree
()
{
return
pctFree
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
32
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
32
)
public
int
getPctUsed
()
{
return
pctUsed
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
33
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
33
)
public
int
getIniTrans
()
{
return
iniTrans
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
34
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
34
)
public
int
getMaxTrans
()
{
return
maxTrans
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
35
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
35
)
public
int
getInitialExtent
()
{
return
initialExtent
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
36
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
36
)
public
int
getNextExtent
()
{
return
nextExtent
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
37
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
37
)
public
int
getMinExtents
()
{
return
minExtents
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
38
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
38
)
public
int
getMaxExtents
()
{
return
maxExtents
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
39
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
39
)
public
int
getPctIncrease
()
{
return
pctIncrease
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
40
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
40
)
public
int
getFreelists
()
{
return
freelists
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
41
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
41
)
public
int
getFreelistGroups
()
{
return
freelistGroups
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
42
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
42
)
public
int
getBlocks
()
{
return
blocks
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
43
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
43
)
public
int
getEmptyBlocks
()
{
return
emptyBlocks
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
44
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
44
)
public
int
getAvgSpace
()
{
return
avgSpace
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
45
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
45
)
public
int
getChainCount
()
{
return
chainCount
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
46
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
46
)
public
int
getAvgRowLen
()
{
return
avgRowLen
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
47
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
47
)
public
int
getAvgSpaceFreelistBlocks
()
{
return
avgSpaceFreelistBlocks
;
}
@Property
(
category
=
CAT_STATISTICS
,
order
=
48
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
order
=
48
)
public
int
getNumFreelistBlocks
()
{
return
numFreelistBlocks
;
}
}
...
...
@@ -188,7 +191,7 @@ public class OracleTable extends OracleTablePhysical implements DBPScriptObject,
}
@Property
(
viewable
=
false
,
category
=
CAT_STATISTICS
,
formatter
=
ByteNumberFormat
.
class
)
@Property
(
viewable
=
false
,
category
=
DBConstants
.
CAT_STATISTICS
,
formatter
=
ByteNumberFormat
.
class
)
public
Long
getTableSize
(
DBRProgressMonitor
monitor
)
throws
DBCException
{
if
(
tableSize
==
null
)
{
loadSize
(
monitor
);
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleTablePhysical.java
浏览文件 @
da5507a5
...
...
@@ -20,6 +20,7 @@ import org.jkiss.code.NotNull;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
...
...
@@ -76,13 +77,13 @@ public abstract class OracleTablePhysical extends OracleTableBase implements DBS
this
.
partitionCache
=
partitioned
?
new
PartitionCache
()
:
null
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
true
,
order
=
20
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
true
,
order
=
20
)
public
long
getRowCount
()
{
return
rowCount
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
21
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
21
)
public
synchronized
Long
getRealRowCount
(
DBRProgressMonitor
monitor
)
{
if
(
realRowCount
!=
null
)
{
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/session/OracleServerSession.java
浏览文件 @
da5507a5
...
...
@@ -33,7 +33,6 @@ public class OracleServerSession extends AbstractServerSession {
public
static
final
String
CAT_PROCESS
=
"Process"
;
public
static
final
String
CAT_IO
=
"IO"
;
public
static
final
String
CAT_WAIT
=
"Wait"
;
//public static final String CAT_STAT = "Statistics";
private
long
instId
;
private
long
sid
;
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreDataSource.java
浏览文件 @
da5507a5
...
...
@@ -103,9 +103,9 @@ public class PostgreDataSource extends JDBCDataSource implements DBSInstanceCont
@Override
public
Object
getDataSourceFeature
(
String
featureId
)
{
switch
(
featureId
)
{
case
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
:
case
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
:
return
10485760
;
case
DB
Constants
.
FEATURE_LOB_REQUIRE_TRANSACTIONS
:
case
DB
PDataSource
.
FEATURE_LOB_REQUIRE_TRANSACTIONS
:
return
true
;
}
return
super
.
getDataSourceFeature
(
featureId
);
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreProcedure.java
浏览文件 @
da5507a5
...
...
@@ -54,7 +54,6 @@ public class PostgreProcedure extends AbstractProcedure<PostgreDataSource, Postg
private
static
final
String
CAT_FLAGS
=
"Flags"
;
private
static
final
String
CAT_PROPS
=
"Properties"
;
private
static
final
String
CAT_STATS
=
"Statistics"
;
public
static
final
float
DEFAULT_EST_ROWS
=
1000.0f
;
public
static
final
float
DEFAULT_COST
=
100.0f
;
...
...
@@ -549,12 +548,12 @@ public class PostgreProcedure extends AbstractProcedure<PostgreDataSource, Postg
return
procTransform
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
false
,
order
=
30
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
false
,
order
=
30
)
public
float
getExecCost
()
{
return
execCost
;
}
@Property
(
category
=
CAT_STAT
S
,
viewable
=
false
,
order
=
31
)
@Property
(
category
=
DBConstants
.
CAT_STATISTIC
S
,
viewable
=
false
,
order
=
31
)
public
float
getEstRows
()
{
return
estRows
;
}
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableReal.java
浏览文件 @
da5507a5
...
...
@@ -20,6 +20,7 @@ import org.jkiss.code.NotNull;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPObjectStatistics
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
...
...
@@ -86,12 +87,12 @@ public abstract class PostgreTableReal extends PostgreTableBase implements DBPOb
return
triggerCache
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
true
,
order
=
22
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
true
,
order
=
22
)
public
long
getRowCountEstimate
()
{
return
rowCountEstimate
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
23
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
expensive
=
true
,
order
=
23
)
public
Long
getRowCount
(
DBRProgressMonitor
monitor
)
{
if
(
rowCount
!=
null
)
{
...
...
@@ -115,7 +116,7 @@ public abstract class PostgreTableReal extends PostgreTableBase implements DBPOb
return
rowCount
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
24
,
formatter
=
ByteNumberFormat
.
class
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
24
,
formatter
=
ByteNumberFormat
.
class
)
public
Long
getDiskSpace
(
DBRProgressMonitor
monitor
)
{
readTableStats
(
monitor
);
...
...
@@ -123,7 +124,7 @@ public abstract class PostgreTableReal extends PostgreTableBase implements DBPOb
return
diskSpace
;
}
@Property
(
category
=
CAT_STATISTICS
,
viewable
=
false
,
order
=
25
,
formatter
=
ByteNumberFormat
.
class
)
@Property
(
category
=
DBConstants
.
CAT_STATISTICS
,
viewable
=
false
,
order
=
25
,
formatter
=
ByteNumberFormat
.
class
)
public
long
getRelationSize
(
DBRProgressMonitor
monitor
)
{
readTableStats
(
monitor
);
return
tableRelSize
;
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBConstants.java
浏览文件 @
da5507a5
...
...
@@ -29,31 +29,7 @@ import java.util.Locale;
public
class
DBConstants
{
/////////////////////////////////
// Features
/**
* Row limit (setMaxSize) affects DML (UPDATE, INSERT, etc) statements.
*/
public
static
final
String
FEATURE_LIMIT_AFFECTS_DML
=
"datasource.limit-affects-dml"
;
/**
* LOB value operations require enabled transactions. I.e. LOB locator life time is 1 transaction.
*/
public
static
final
String
FEATURE_LOB_REQUIRE_TRANSACTIONS
=
"datasource.lob-require-transactions"
;
/**
* Max string length. Used by data transfer/compare/migration tools.
* null means "unknown", -1 means any length (i.e. explicit length is not needed)
*/
public
static
final
String
FEATURE_MAX_STRING_LENGTH
=
"datasource.max-string-type-length"
;
/////////////////////////////////
// Misc
public
static
final
int
METADATA_FETCH_SIZE
=
1000
;
public
static
final
String
DATA_SOURCE_PROPERTY_USER
=
"user"
;
//NON-NLS-1
public
static
final
String
DATA_SOURCE_PROPERTY_PASSWORD
=
"password"
;
//NON-NLS-1
public
static
final
String
NULL_VALUE_LABEL
=
"[NULL]"
;
//NON-NLS-1
// Standard properties
public
static
final
String
PROP_ID_NAME
=
"name"
;
//NON-NLS-1
public
static
final
String
PROP_ID_DESCRIPTION
=
"description"
;
//NON-NLS-1
...
...
@@ -68,9 +44,22 @@ public class DBConstants {
public
static
final
String
PARAM_OBJECT_DEFINITION_TEXT
=
"objectDefinitionText"
;
//NON-NLS-1
public
static
final
String
PARAM_EXTENDED_DEFINITION_TEXT
=
"extendedDefinitionText"
;
//NON-NLS-1
/////////////////////////////////
// Variables
public
static
final
String
VAR_CONTEXT_NAME
=
"context.name"
;
public
static
final
String
VAR_CONTEXT_ID
=
"context.id"
;
/////////////////////////////////
// Misc
public
static
final
int
METADATA_FETCH_SIZE
=
1000
;
public
static
final
String
DATA_SOURCE_PROPERTY_USER
=
"user"
;
//NON-NLS-1
public
static
final
String
DATA_SOURCE_PROPERTY_PASSWORD
=
"password"
;
//NON-NLS-1
public
static
final
String
NULL_VALUE_LABEL
=
"[NULL]"
;
//NON-NLS-1
// Internal properties prefix. This is a legacy properties marker (used to divide driver properties from provider properties)
// Left for backward compatibility. Do not use it for new provider property names
public
static
final
String
INTERNAL_PROP_PREFIX
=
"@dbeaver-"
;
//NON-NLS-1
...
...
@@ -123,4 +112,27 @@ public class DBConstants {
public
static
final
String
LABEL_NA
=
"N/A"
;
public
static
final
String
DEBUG_LOG_FILE_NAME
=
"dbeaver-debug.log"
;
/////////////////////////////////
// Property categories and features
public
static
final
String
CAT_MAIN
=
"Main"
;
public
static
final
String
CAT_STATISTICS
=
"Statistics"
;
public
static
final
String
PROP_FEATURE_EXPENSIVE
=
"expensive"
;
public
static
final
String
PROP_FEATURE_NUMERIC
=
"numeric"
;
public
static
final
String
PROP_FEATURE_DATETME
=
"datetme"
;
public
static
final
String
PROP_FEATURE_HIDDEN
=
"hidden"
;
public
static
final
String
PROP_FEATURE_REMOTE
=
"remote"
;
public
static
final
String
PROP_FEATURE_OPTIONAL
=
"optional"
;
public
static
final
String
PROP_FEATURE_SPECIFIC
=
"specific"
;
public
static
final
String
PROP_FEATURE_REQUIRED
=
"required"
;
public
static
final
String
PROP_FEATURE_PASSWORD
=
"password"
;
public
static
final
String
PROP_FEATURE_NAME
=
"name"
;
public
static
final
String
PROP_FEATURE_MULTILINE
=
"multiline"
;
public
static
final
String
PROP_FEATURE_EDIT_POSSIBLE
=
"editPossible"
;
public
static
final
String
PROP_FEATURE_LINK_POSSIBLE
=
"linkPossible"
;
public
static
final
String
PROP_FEATURE_HREF
=
"href"
;
public
static
final
String
PROP_FEATURE_VIEWABLE
=
"viewable"
;
}
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBPDataSource.java
浏览文件 @
da5507a5
...
...
@@ -33,6 +33,20 @@ import org.jkiss.dbeaver.model.struct.DBSInstanceContainer;
*/
public
interface
DBPDataSource
extends
DBSInstanceContainer
{
/**
* Row limit (setMaxSize) affects DML (UPDATE, INSERT, etc) statements.
*/
String
FEATURE_LIMIT_AFFECTS_DML
=
"datasource.limit-affects-dml"
;
/**
* LOB value operations require enabled transactions. I.e. LOB locator life time is 1 transaction.
*/
String
FEATURE_LOB_REQUIRE_TRANSACTIONS
=
"datasource.lob-require-transactions"
;
/**
* Max string length. Used by data transfer/compare/migration tools.
* null means "unknown", -1 means any length (i.e. explicit length is not needed)
*/
String
FEATURE_MAX_STRING_LENGTH
=
"datasource.max-string-type-length"
;
/**
* Datasource container
* @return container implementation
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBUtils.java
浏览文件 @
da5507a5
...
...
@@ -1211,7 +1211,7 @@ public final class DBUtils {
final
boolean
hasLimits
=
(
offset
>
0
||
selectQuery
)
&&
maxRows
>
0
;
// This is a flag for any potential SELECT query
boolean
possiblySelect
=
sqlQuery
.
getType
()
==
SQLQueryType
.
SELECT
||
sqlQuery
.
getType
()
==
SQLQueryType
.
UNKNOWN
;
boolean
limitAffectsDML
=
Boolean
.
TRUE
.
equals
(
session
.
getDataSource
().
getDataSourceFeature
(
DB
Constants
.
FEATURE_LIMIT_AFFECTS_DML
));
boolean
limitAffectsDML
=
Boolean
.
TRUE
.
equals
(
session
.
getDataSource
().
getDataSourceFeature
(
DB
PDataSource
.
FEATURE_LIMIT_AFFECTS_DML
));
DBCQueryTransformer
limitTransformer
=
null
,
fetchAllTransformer
=
null
;
if
(
selectQuery
)
{
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCTable.java
浏览文件 @
da5507a5
...
...
@@ -60,8 +60,6 @@ public abstract class JDBCTable<DATASOURCE extends DBPDataSource, CONTAINER exte
{
private
static
final
Log
log
=
Log
.
getLog
(
JDBCTable
.
class
);
protected
static
final
String
CAT_STATISTICS
=
"Statistics"
;
private
static
final
String
DEFAULT_TABLE_ALIAS
=
"x"
;
private
boolean
persisted
;
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/sql/AbstractSQLDialect.java
浏览文件 @
da5507a5
...
...
@@ -660,7 +660,7 @@ public abstract class AbstractSQLDialect implements SQLDialect {
if
(
typeName
.
indexOf
(
'('
)
==
-
1
)
{
long
maxLength
=
column
.
getMaxLength
();
if
(
maxLength
>
0
&&
maxLength
!=
Integer
.
MAX_VALUE
&&
maxLength
!=
Long
.
MAX_VALUE
)
{
Object
maxStringLength
=
dataSource
.
getDataSourceFeature
(
DB
Constants
.
FEATURE_MAX_STRING_LENGTH
);
Object
maxStringLength
=
dataSource
.
getDataSourceFeature
(
DB
PDataSource
.
FEATURE_MAX_STRING_LENGTH
);
if
(
maxStringLength
instanceof
Number
)
{
int
lengthLimit
=
((
Number
)
maxStringLength
).
intValue
();
if
(
lengthLimit
<
0
)
{
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/runtime/properties/ObjectPropertyDescriptor.java
浏览文件 @
da5507a5
...
...
@@ -19,6 +19,7 @@ package org.jkiss.dbeaver.runtime.properties;
import
org.eclipse.core.internal.runtime.Activator
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPPersistedObject
;
import
org.jkiss.dbeaver.model.exec.DBExecUtils
;
import
org.jkiss.dbeaver.model.impl.AbstractDescriptor
;
...
...
@@ -49,6 +50,7 @@ import java.util.ResourceBundle;
*/
public
class
ObjectPropertyDescriptor
extends
ObjectAttributeDescriptor
implements
DBPPropertyDescriptor
,
IPropertyValueListProvider
<
Object
>
{
private
final
Property
propInfo
;
private
final
String
propName
;
private
final
String
propDescription
;
...
...
@@ -223,56 +225,58 @@ public class ObjectPropertyDescriptor extends ObjectAttributeDescriptor implemen
@Override
public
String
[]
getFeatures
()
{
List
<
String
>
features
=
new
ArrayList
<>();
if
(
this
.
isRequired
())
features
.
add
(
"required"
);
if
(
this
.
isSpecific
())
features
.
add
(
"specific"
);
if
(
this
.
isOptional
())
features
.
add
(
"optional"
);
if
(
this
.
isHidden
())
features
.
add
(
"hidden"
);
if
(
this
.
isRemote
())
features
.
add
(
"remote"
);
if
(
this
.
isDateTime
())
features
.
add
(
"datetme"
);
if
(
this
.
isNumeric
())
features
.
add
(
"numeric"
);
if
(
this
.
isNameProperty
())
features
.
add
(
"name"
);
if
(
this
.
getLength
()
==
PropertyLength
.
MULTILINE
)
features
.
add
(
"multiline"
);
if
(
this
.
isExpensive
())
features
.
add
(
"expensive"
);
if
(
this
.
isEditPossible
())
features
.
add
(
"editPossible"
);
if
(
this
.
isLinkPossible
())
features
.
add
(
"linkPossible"
);
if
(
this
.
isHref
())
features
.
add
(
"href"
);
if
(
this
.
isViewable
())
features
.
add
(
"viewable"
);
if
(
this
.
isPassword
())
features
.
add
(
"password"
);
if
(
this
.
isRequired
())
features
.
add
(
DBConstants
.
PROP_FEATURE_REQUIRED
);
if
(
this
.
isSpecific
())
features
.
add
(
DBConstants
.
PROP_FEATURE_SPECIFIC
);
if
(
this
.
isOptional
())
features
.
add
(
DBConstants
.
PROP_FEATURE_OPTIONAL
);
if
(
this
.
isHidden
())
features
.
add
(
DBConstants
.
PROP_FEATURE_HIDDEN
);
if
(
this
.
isRemote
())
features
.
add
(
DBConstants
.
PROP_FEATURE_REMOTE
);
if
(
this
.
isDateTime
())
features
.
add
(
DBConstants
.
PROP_FEATURE_DATETME
);
if
(
this
.
isNumeric
())
features
.
add
(
DBConstants
.
PROP_FEATURE_NUMERIC
);
if
(
this
.
isNameProperty
())
features
.
add
(
DBConstants
.
PROP_FEATURE_NAME
);
if
(
this
.
getLength
()
==
PropertyLength
.
MULTILINE
)
features
.
add
(
DBConstants
.
PROP_FEATURE_MULTILINE
);
if
(
this
.
isExpensive
())
features
.
add
(
DBConstants
.
PROP_FEATURE_EXPENSIVE
);
if
(
this
.
isEditPossible
())
features
.
add
(
DBConstants
.
PROP_FEATURE_EDIT_POSSIBLE
);
if
(
this
.
isLinkPossible
())
features
.
add
(
DBConstants
.
PROP_FEATURE_LINK_POSSIBLE
);
if
(
this
.
isHref
())
features
.
add
(
DBConstants
.
PROP_FEATURE_HREF
);
if
(
this
.
isViewable
())
features
.
add
(
DBConstants
.
PROP_FEATURE_VIEWABLE
);
if
(
this
.
isPassword
())
features
.
add
(
DBConstants
.
PROP_FEATURE_PASSWORD
);
return
features
.
toArray
(
new
String
[
0
]);
}
@Override
public
boolean
hasFeature
(
@NotNull
String
feature
)
{
switch
(
feature
)
{
case
"required"
:
case
DBConstants
.
PROP_FEATURE_REQUIRED
:
return
this
.
isRequired
();
case
"specific"
:
case
DBConstants
.
PROP_FEATURE_SPECIFIC
:
return
this
.
isSpecific
();
case
"optional"
:
case
DBConstants
.
PROP_FEATURE_OPTIONAL
:
return
this
.
isOptional
();
case
"hidden"
:
case
DBConstants
.
PROP_FEATURE_HIDDEN
:
return
this
.
isHidden
();
case
"datetme"
:
case
DBConstants
.
PROP_FEATURE_DATETME
:
return
this
.
isDateTime
();
case
"numeric"
:
case
DBConstants
.
PROP_FEATURE_NUMERIC
:
return
this
.
isNumeric
();
case
"name"
:
case
DBConstants
.
PROP_FEATURE_NAME
:
return
this
.
isNameProperty
();
case
"multiline"
:
case
DBConstants
.
PROP_FEATURE_MULTILINE
:
return
this
.
getLength
()
==
PropertyLength
.
MULTILINE
;
case
"expensive"
:
case
DBConstants
.
PROP_FEATURE_EXPENSIVE
:
return
this
.
isExpensive
();
case
"editPossible"
:
case
DBConstants
.
PROP_FEATURE_EDIT_POSSIBLE
:
return
this
.
isEditPossible
();
case
"linkPossible"
:
case
DBConstants
.
PROP_FEATURE_LINK_POSSIBLE
:
return
this
.
isLinkPossible
();
case
"viewable"
:
case
DBConstants
.
PROP_FEATURE_HREF
:
return
this
.
isHref
();
case
DBConstants
.
PROP_FEATURE_VIEWABLE
:
return
this
.
isViewable
();
case
"password"
:
case
DBConstants
.
PROP_FEATURE_PASSWORD
:
return
this
.
isPassword
();
}
return
false
;
...
...
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/controls/PropertyPageStandard.java
浏览文件 @
da5507a5
...
...
@@ -66,6 +66,7 @@ public class PropertyPageStandard extends PropertySheetPage implements ILazyProp
}
);
setPropertySourceProvider
(
this
);
// Register lazy load listener
PropertiesContributor
.
getInstance
().
addLazyListener
(
this
);
}
...
...
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertyDescriptorDelegate.java
浏览文件 @
da5507a5
...
...
@@ -23,6 +23,7 @@ import org.eclipse.swt.SWT;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.ui.views.properties.IPropertyDescriptor
;
import
org.eclipse.ui.views.properties.IPropertySheetEntry
;
import
org.jkiss.dbeaver.model.*
;
import
org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.preferences.DBPPropertySource
;
...
...
@@ -83,7 +84,11 @@ public class PropertyDescriptorDelegate implements IPropertyDescriptor
@Override
public
String
getCategory
()
{
return
delegate
.
getCategory
();
String
category
=
delegate
.
getCategory
();
if
(
CommonUtils
.
isEmpty
(
category
))
{
category
=
DBConstants
.
CAT_MAIN
;
}
return
category
;
}
@Override
...
...
@@ -98,6 +103,12 @@ public class PropertyDescriptorDelegate implements IPropertyDescriptor
@Override
public
String
[]
getFilterFlags
()
{
if
(
delegate
.
hasFeature
(
DBConstants
.
PROP_FEATURE_EXPENSIVE
)
||
delegate
.
hasFeature
(
DBConstants
.
PROP_FEATURE_HIDDEN
)
||
DBConstants
.
CAT_STATISTICS
.
equals
(
delegate
.
getCategory
()))
{
return
new
String
[]
{
IPropertySheetEntry
.
FILTER_ID_EXPERT
};
}
return
null
;
}
...
...
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertySourceDelegate.java
浏览文件 @
da5507a5
...
...
@@ -18,6 +18,7 @@ package org.jkiss.dbeaver.ui.properties;
import
org.eclipse.ui.views.properties.IPropertyDescriptor
;
import
org.eclipse.ui.views.properties.IPropertySource2
;
import
org.jkiss.dbeaver.model.DBPNamedObject
;
import
org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.preferences.DBPPropertySource
;
import
org.jkiss.utils.CommonUtils
;
...
...
@@ -58,7 +59,11 @@ public class PropertySourceDelegate implements IPropertySource2
@Override
public
Object
getPropertyValue
(
Object
id
)
{
return
source
.
getPropertyValue
(
null
,
CommonUtils
.
toString
(
id
));
Object
value
=
source
.
getPropertyValue
(
null
,
CommonUtils
.
toString
(
id
));
if
(
value
instanceof
DBPNamedObject
)
{
return
((
DBPNamedObject
)
value
).
getName
();
}
return
CommonUtils
.
toString
(
value
);
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录