Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
8a6b997a
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,发现更多精彩内容 >>
提交
8a6b997a
编写于
4月 30, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Generic table column create fix
上级
f232f960
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
29 addition
and
17 deletion
+29
-17
plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdMetaModel.java
...g/jkiss/dbeaver/ext/firebird/model/FireBirdMetaModel.java
+2
-2
plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdTableColumn.java
...jkiss/dbeaver/ext/firebird/model/FireBirdTableColumn.java
+2
-2
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/edit/GenericTableColumnManager.java
...s/dbeaver/ext/generic/edit/GenericTableColumnManager.java
+22
-9
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/model/TableCache.java
...c/src/org/jkiss/dbeaver/ext/generic/model/TableCache.java
+0
-1
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/model/meta/GenericMetaModel.java
...kiss/dbeaver/ext/generic/model/meta/GenericMetaModel.java
+1
-1
plugins/org.jkiss.dbeaver.ext.sqlite/src/org/jkiss/dbeaver/ext/sqlite/model/SQLiteMetaModel.java
...c/org/jkiss/dbeaver/ext/sqlite/model/SQLiteMetaModel.java
+1
-1
plugins/org.jkiss.dbeaver.ext.vertica/src/org/jkiss/dbeaver/ext/vertica/model/VerticaMetaModel.java
...org/jkiss/dbeaver/ext/vertica/model/VerticaMetaModel.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdMetaModel.java
浏览文件 @
8a6b997a
...
...
@@ -196,8 +196,8 @@ public class FireBirdMetaModel extends GenericMetaModel
}
@Override
public
GenericTableColumn
createTableColumnImpl
(
JDBCSession
session
,
JDBCResultSet
dbResult
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
return
new
FireBirdTableColumn
(
session
,
table
,
public
GenericTableColumn
createTableColumnImpl
(
DBRProgressMonitor
monitor
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
return
new
FireBirdTableColumn
(
monitor
,
table
,
columnName
,
typeName
,
valueType
,
sourceType
,
ordinalPos
,
columnSize
,
...
...
plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdTableColumn.java
浏览文件 @
8a6b997a
...
...
@@ -41,10 +41,10 @@ public class FireBirdTableColumn extends GenericTableColumn {
super
(
table
);
}
public
FireBirdTableColumn
(
JDBCSession
session
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPosition
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
public
FireBirdTableColumn
(
DBRProgressMonitor
monitor
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPosition
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
super
(
table
,
columnName
,
typeName
,
valueType
,
sourceType
,
ordinalPosition
,
columnSize
,
charLength
,
scale
,
precision
,
radix
,
notNull
,
remarks
,
defaultValue
,
autoIncrement
,
autoGenerated
);
if
(
typeName
.
equals
(
"CHAR"
)
||
typeName
.
equals
(
"VARCHAR"
))
{
getDomainTypeName
(
session
.
getProgressMonitor
()
);
getDomainTypeName
(
monitor
);
}
if
(
domainTypeName
!=
null
)
{
dataType
=
(
FireBirdDataType
)
table
.
getDataSource
().
getLocalDataType
(
domainTypeName
);
...
...
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/edit/GenericTableColumnManager.java
浏览文件 @
8a6b997a
...
...
@@ -18,6 +18,7 @@
package
org.jkiss.dbeaver.ext.generic.edit
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.ext.generic.GenericConstants
;
import
org.jkiss.dbeaver.ext.generic.model.GenericTable
;
import
org.jkiss.dbeaver.ext.generic.model.GenericTableColumn
;
...
...
@@ -48,17 +49,29 @@ public class GenericTableColumnManager extends SQLTableColumnManager<GenericTabl
}
@Override
protected
GenericTableColumn
createDatabaseObject
(
DBRProgressMonitor
monitor
,
DBECommandContext
context
,
GenericTable
parent
,
Object
copyFrom
)
{
protected
GenericTableColumn
createDatabaseObject
(
DBRProgressMonitor
monitor
,
DBECommandContext
context
,
GenericTable
parent
,
Object
copyFrom
)
throws
DBException
{
DBSDataType
columnType
=
findBestDataType
(
parent
.
getDataSource
(),
DBConstants
.
DEFAULT_DATATYPE_NAMES
);
final
GenericTableColumn
column
=
new
GenericTableColumn
(
parent
);
column
.
setName
(
getNewColumnName
(
monitor
,
context
,
parent
));
column
.
setTypeName
(
columnType
==
null
?
"INTEGER"
:
columnType
.
getName
());
column
.
setMaxLength
(
columnType
!=
null
&&
columnType
.
getDataKind
()
==
DBPDataKind
.
STRING
?
100
:
0
);
column
.
setValueType
(
columnType
==
null
?
Types
.
INTEGER
:
columnType
.
getTypeID
());
column
.
setOrdinalPosition
(-
1
);
return
column
;
int
columnSize
=
columnType
!=
null
&&
columnType
.
getDataKind
()
==
DBPDataKind
.
STRING
?
100
:
0
;
return
parent
.
getDataSource
().
getMetaModel
().
createTableColumnImpl
(
monitor
,
parent
,
getNewColumnName
(
monitor
,
context
,
parent
),
columnType
==
null
?
"INTEGER"
:
columnType
.
getName
(),
columnType
==
null
?
Types
.
INTEGER
:
columnType
.
getTypeID
(),
columnType
==
null
?
Types
.
INTEGER
:
columnType
.
getTypeID
(),
-
1
,
columnSize
,
columnSize
,
null
,
null
,
10
,
false
,
null
,
null
,
false
,
false
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/model/TableCache.java
浏览文件 @
8a6b997a
...
...
@@ -187,7 +187,6 @@ public class TableCache extends JDBCStructLookupCache<GenericStructContainer, Ge
return
getDataSource
().
getMetaModel
().
createTableColumnImpl
(
session
,
dbResult
,
table
,
columnName
,
typeName
,
valueType
,
sourceType
,
ordinalPos
,
...
...
plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/model/meta/GenericMetaModel.java
浏览文件 @
8a6b997a
...
...
@@ -423,7 +423,7 @@ public class GenericMetaModel {
//////////////////////////////////////////////////////
// Table columns
public
GenericTableColumn
createTableColumnImpl
(
JDBCSession
session
,
JDBCResultSet
dbResult
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
public
GenericTableColumn
createTableColumnImpl
(
DBRProgressMonitor
monitor
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
return
new
GenericTableColumn
(
table
,
columnName
,
typeName
,
valueType
,
sourceType
,
ordinalPos
,
...
...
plugins/org.jkiss.dbeaver.ext.sqlite/src/org/jkiss/dbeaver/ext/sqlite/model/SQLiteMetaModel.java
浏览文件 @
8a6b997a
...
...
@@ -156,7 +156,7 @@ public class SQLiteMetaModel extends GenericMetaModel implements DBCQueryTransfo
}
@Override
public
GenericTableColumn
createTableColumnImpl
(
JDBCSession
session
,
JDBCResultSet
dbResult
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
{
public
GenericTableColumn
createTableColumnImpl
(
DBRProgressMonitor
monitor
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
{
return
new
SQLiteTableColumn
(
table
,
columnName
,
typeName
,
valueType
,
sourceType
,
ordinalPos
,
columnSize
,
charLength
,
scale
,
precision
,
radix
,
notNull
,
remarks
,
defaultValue
,
autoIncrement
,
autoGenerated
);
}
}
plugins/org.jkiss.dbeaver.ext.vertica/src/org/jkiss/dbeaver/ext/vertica/model/VerticaMetaModel.java
浏览文件 @
8a6b997a
...
...
@@ -93,7 +93,7 @@ public class VerticaMetaModel extends GenericMetaModel implements DBCQueryTransf
}
@Override
public
GenericTableColumn
createTableColumnImpl
(
JDBCSession
session
,
JDBCResultSet
dbResult
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
public
GenericTableColumn
createTableColumnImpl
(
DBRProgressMonitor
monitor
,
GenericTable
table
,
String
columnName
,
String
typeName
,
int
valueType
,
int
sourceType
,
int
ordinalPos
,
long
columnSize
,
long
charLength
,
Integer
scale
,
Integer
precision
,
int
radix
,
boolean
notNull
,
String
remarks
,
String
defaultValue
,
boolean
autoIncrement
,
boolean
autoGenerated
)
throws
DBException
{
return
new
VerticaTableColumn
(
table
,
columnName
,
typeName
,
valueType
,
sourceType
,
ordinalPos
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录