Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
b9816c62
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
b9816c62
编写于
12月 26, 2015
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#12 PostgreSQL class cache
上级
03798494
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
112 addition
and
84 deletion
+112
-84
plugins/org.jkiss.dbeaver.ext.postgresql/plugin.xml
plugins/org.jkiss.dbeaver.ext.postgresql/plugin.xml
+3
-3
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreClass.java
.../org/jkiss/dbeaver/ext/postgresql/model/PostgreClass.java
+44
-0
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreDatabase.java
...g/jkiss/dbeaver/ext/postgresql/model/PostgreDatabase.java
+1
-1
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSchema.java
...org/jkiss/dbeaver/ext/postgresql/model/PostgreSchema.java
+47
-27
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTable.java
.../org/jkiss/dbeaver/ext/postgresql/model/PostgreTable.java
+1
-1
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableBase.java
.../jkiss/dbeaver/ext/postgresql/model/PostgreTableBase.java
+14
-50
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableColumn.java
...kiss/dbeaver/ext/postgresql/model/PostgreTableColumn.java
+2
-2
未找到文件。
plugins/org.jkiss.dbeaver.ext.postgresql/plugin.xml
浏览文件 @
b9816c62
...
...
@@ -24,9 +24,9 @@
<items
label=
"%tree.column.node.name"
path=
"attribute"
property=
"attributes"
icon=
"#column"
>
</items>
</folder>
<folder
type=
"org.jkiss.dbeaver.ext.generic.model.GenericPrimaryKey"
label=
"%tree.
uni_key
s.node.name"
icon=
"#constraints"
description=
"Table unique keys"
visibleIf=
"!object.view"
>
<items
label=
"%tree.
uni_key
.node.name"
path=
"uniqueKey"
property=
"constraints"
icon=
"#unique-key"
>
<items
label=
"%tree.
uni_key
.columns.node.name"
itemLabel=
"%tree.column.node.name"
path=
"column"
property=
"attributeReferences"
navigable=
"false"
inline=
"true"
>
<folder
type=
"org.jkiss.dbeaver.ext.generic.model.GenericPrimaryKey"
label=
"%tree.
constraint
s.node.name"
icon=
"#constraints"
description=
"Table unique keys"
visibleIf=
"!object.view"
>
<items
label=
"%tree.
constraint
.node.name"
path=
"uniqueKey"
property=
"constraints"
icon=
"#unique-key"
>
<items
label=
"%tree.
constraint
.columns.node.name"
itemLabel=
"%tree.column.node.name"
path=
"column"
property=
"attributeReferences"
navigable=
"false"
inline=
"true"
>
</items>
</items>
</folder>
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreClass.java
0 → 100644
浏览文件 @
b9816c62
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2015 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.ext.postgresql.model
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.model.DBPNamedObject2
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.struct.DBSObject
;
/**
* PostgreClass
*/
public
interface
PostgreClass
extends
PostgreObject
,
DBSObject
,
DBPNamedObject2
,
DBPRefreshableObject
{
enum
RelKind
{
r
,
// ordinary table
i
,
// index
S
,
// sequence
v
,
// view
m
,
// materialized view
c
,
// composite type
t
,
// TOAST table
f
,
// = foreign table
}
@NotNull
PostgreDataSource
getDataSource
();
}
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreDatabase.java
浏览文件 @
b9816c62
...
...
@@ -199,7 +199,7 @@ public class PostgreDatabase implements DBSInstance, DBSCatalog, PostgreObject {
@Override
protected
JDBCStatement
prepareObjectsStatement
(
@NotNull
JDBCSession
session
,
@NotNull
PostgreDatabase
owner
)
throws
SQLException
{
StringBuilder
catalogQuery
=
new
StringBuilder
(
"SELECT
* FROM pg_catalog.pg_namespace
"
);
StringBuilder
catalogQuery
=
new
StringBuilder
(
"SELECT
n.oid,n.* FROM pg_catalog.pg_namespace n
"
);
DBSObjectFilter
catalogFilters
=
owner
.
getDataSource
().
getContainer
().
getObjectFilter
(
PostgreSchema
.
class
,
null
,
false
);
if
(
catalogFilters
!=
null
)
{
JDBCUtils
.
appendFilterClause
(
catalogQuery
,
catalogFilters
,
PostgreConstants
.
COL_SCHEMA_NAME
,
true
);
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSchema.java
浏览文件 @
b9816c62
...
...
@@ -20,6 +20,7 @@ package org.jkiss.dbeaver.ext.postgresql.model;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.ext.postgresql.PostgreConstants
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBPSaveableObject
;
...
...
@@ -53,15 +54,18 @@ import java.util.List;
/**
* PostgreSchema
*/
public
class
PostgreSchema
implements
DBSSchema
,
DBPSaveableObject
,
DBPRefreshableObject
,
DBPSystemObject
,
DBSProcedureContainer
{
public
class
PostgreSchema
implements
DBSSchema
,
DBPSaveableObject
,
DBPRefreshableObject
,
DBPSystemObject
,
DBSProcedureContainer
,
PostgreObject
{
static
final
Log
log
=
Log
.
getLog
(
PostgreSchema
.
class
);
private
PostgreDatabase
database
;
private
int
oid
;
private
String
name
;
private
int
ownerId
;
private
PostgreCharset
defaultCharset
;
private
boolean
persisted
;
final
TableCache
tableCache
=
new
Table
Cache
();
final
ClassCache
classCache
=
new
Class
Cache
();
final
ProceduresCache
proceduresCache
=
new
ProceduresCache
();
final
TriggerCache
triggerCache
=
new
TriggerCache
();
final
ConstraintCache
constraintCache
=
new
ConstraintCache
();
...
...
@@ -79,6 +83,7 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
private
void
loadInfo
(
ResultSet
dbResult
)
throws
SQLException
{
this
.
oid
=
JDBCUtils
.
safeGetInt
(
dbResult
,
"oid"
);
this
.
ownerId
=
JDBCUtils
.
safeGetInt
(
dbResult
,
"nspowner"
);
this
.
defaultCharset
=
null
;
this
.
persisted
=
true
;
...
...
@@ -98,6 +103,11 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
return
name
;
}
@Override
public
int
getObjectId
()
{
return
this
.
oid
;
}
@Property
(
viewable
=
true
,
order
=
4
)
public
int
getOwnerId
()
{
return
ownerId
;
...
...
@@ -148,20 +158,20 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
public
Collection
<
PostgreTable
>
getTables
(
DBRProgressMonitor
monitor
)
throws
DBException
{
return
table
Cache
.
getTypedObjects
(
monitor
,
this
,
PostgreTable
.
class
);
return
class
Cache
.
getTypedObjects
(
monitor
,
this
,
PostgreTable
.
class
);
}
public
PostgreTable
getTable
(
DBRProgressMonitor
monitor
,
String
name
)
throws
DBException
{
return
table
Cache
.
getObject
(
monitor
,
this
,
name
,
PostgreTable
.
class
);
return
class
Cache
.
getObject
(
monitor
,
this
,
name
,
PostgreTable
.
class
);
}
@Association
public
Collection
<
PostgreView
>
getViews
(
DBRProgressMonitor
monitor
)
throws
DBException
{
return
table
Cache
.
getTypedObjects
(
monitor
,
this
,
PostgreView
.
class
);
return
class
Cache
.
getTypedObjects
(
monitor
,
this
,
PostgreView
.
class
);
}
@Association
...
...
@@ -194,14 +204,14 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
public
Collection
<
PostgreTableBase
>
getChildren
(
@NotNull
DBRProgressMonitor
monitor
)
throws
DBException
{
return
table
Cache
.
getAllObjects
(
monitor
,
this
);
return
class
Cache
.
getAllObjects
(
monitor
,
this
);
}
@Override
public
PostgreTableBase
getChild
(
@NotNull
DBRProgressMonitor
monitor
,
@NotNull
String
childName
)
throws
DBException
{
return
table
Cache
.
getObject
(
monitor
,
this
,
childName
);
return
class
Cache
.
getObject
(
monitor
,
this
,
childName
);
}
@Override
...
...
@@ -216,10 +226,10 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
throws
DBException
{
monitor
.
subTask
(
"Cache tables"
);
table
Cache
.
getAllObjects
(
monitor
,
this
);
class
Cache
.
getAllObjects
(
monitor
,
this
);
if
((
scope
&
STRUCT_ATTRIBUTES
)
!=
0
)
{
monitor
.
subTask
(
"Cache table columns"
);
table
Cache
.
loadChildren
(
monitor
,
this
,
null
);
class
Cache
.
loadChildren
(
monitor
,
this
,
null
);
}
if
((
scope
&
STRUCT_ASSOCIATIONS
)
!=
0
)
{
monitor
.
subTask
(
"Cache table constraints"
);
...
...
@@ -231,7 +241,7 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
public
synchronized
boolean
refreshObject
(
@NotNull
DBRProgressMonitor
monitor
)
throws
DBException
{
table
Cache
.
clearCache
();
class
Cache
.
clearCache
();
indexCache
.
clearCache
();
constraintCache
.
clearCache
();
proceduresCache
.
clearCache
();
...
...
@@ -245,19 +255,19 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
return
PostgreConstants
.
INFO_SCHEMA_NAME
.
equalsIgnoreCase
(
getName
())
||
PostgreConstants
.
CATALOG_SCHEMA_NAME
.
equalsIgnoreCase
(
getName
());
}
public
class
Table
Cache
extends
JDBCStructCache
<
PostgreSchema
,
PostgreTableBase
,
PostgreTableColumn
>
{
public
class
Class
Cache
extends
JDBCStructCache
<
PostgreSchema
,
PostgreTableBase
,
PostgreTableColumn
>
{
protected
Table
Cache
()
protected
Class
Cache
()
{
super
(
JDBCConstants
.
TABLE_NAME
);
super
(
"relname"
);
}
@Override
protected
JDBCStatement
prepareObjectsStatement
(
@NotNull
JDBCSession
session
,
@NotNull
PostgreSchema
owner
)
throws
SQLException
{
final
JDBCPreparedStatement
dbStat
=
session
.
prepareStatement
(
"SELECT
* FROM pg_catalog.pg_tables WHERE schemanam
e=?"
);
dbStat
.
set
String
(
1
,
getName
());
final
JDBCPreparedStatement
dbStat
=
session
.
prepareStatement
(
"SELECT
c.oid,c.* FROM pg_catalog.pg_class c WHERE c.relnamespac
e=?"
);
dbStat
.
set
Int
(
1
,
getObjectId
());
return
dbStat
;
}
...
...
@@ -265,7 +275,23 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
protected
PostgreTableBase
fetchObject
(
@NotNull
JDBCSession
session
,
@NotNull
PostgreSchema
owner
,
@NotNull
ResultSet
dbResult
)
throws
SQLException
,
DBException
{
return
new
PostgreTable
(
PostgreSchema
.
this
,
dbResult
);
final
String
kindString
=
JDBCUtils
.
safeGetString
(
dbResult
,
"relkind"
);
PostgreClass
.
RelKind
kind
;
try
{
kind
=
PostgreClass
.
RelKind
.
valueOf
(
kindString
);
}
catch
(
IllegalArgumentException
e
)
{
log
.
warn
(
"Unexpected class '"
+
kindString
+
"'"
,
e
);
return
null
;
}
switch
(
kind
)
{
case
r:
return
new
PostgreTable
(
PostgreSchema
.
this
,
dbResult
);
case
v:
return
new
PostgreView
(
PostgreSchema
.
this
,
dbResult
);
default
:
log
.
warn
(
"Unsupported class '"
+
kind
+
"'"
);
return
null
;
}
}
@Override
...
...
@@ -273,18 +299,12 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
throws
SQLException
{
StringBuilder
sql
=
new
StringBuilder
();
sql
.
append
(
"SELECT * FROM "
).
append
(
PostgreConstants
.
META_TABLE_COLUMNS
)
.
append
(
" WHERE "
).
append
(
PostgreConstants
.
COL_TABLE_SCHEMA
).
append
(
"=?"
);
if
(
forTable
!=
null
)
{
sql
.
append
(
" AND "
).
append
(
PostgreConstants
.
COL_TABLE_NAME
).
append
(
"=?"
);
}
sql
.
append
(
" ORDER BY "
).
append
(
PostgreConstants
.
COL_ORDINAL_POSITION
);
sql
.
append
(
"SELECT c.relname,a.* FROM pg_catalog.pg_attribute a,pg_catalog.pg_class c WHERE a.attrelid=c.oid AND c.oid=?"
);
sql
.
append
(
" ORDER BY a.attnum"
);
JDBCPreparedStatement
dbStat
=
session
.
prepareStatement
(
sql
.
toString
());
dbStat
.
setString
(
1
,
PostgreSchema
.
this
.
getName
());
if
(
forTable
!=
null
)
{
dbStat
.
set
String
(
2
,
forTable
.
getName
());
dbStat
.
set
Int
(
1
,
forTable
.
getObjectId
());
}
return
dbStat
;
}
...
...
@@ -303,7 +323,7 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
class
IndexCache
extends
JDBCCompositeCache
<
PostgreSchema
,
PostgreTable
,
PostgreTableIndex
,
PostgreTableIndexColumn
>
{
protected
IndexCache
()
{
super
(
table
Cache
,
PostgreTable
.
class
,
PostgreConstants
.
COL_TABLE_NAME
,
PostgreConstants
.
COL_INDEX_NAME
);
super
(
class
Cache
,
PostgreTable
.
class
,
PostgreConstants
.
COL_TABLE_NAME
,
PostgreConstants
.
COL_INDEX_NAME
);
}
@Override
...
...
@@ -389,7 +409,7 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
class
ConstraintCache
extends
JDBCCompositeCache
<
PostgreSchema
,
PostgreTable
,
PostgreTableConstraint
,
PostgreTableConstraintColumn
>
{
protected
ConstraintCache
()
{
super
(
table
Cache
,
PostgreTable
.
class
,
PostgreConstants
.
COL_TABLE_NAME
,
PostgreConstants
.
COL_CONSTRAINT_NAME
);
super
(
class
Cache
,
PostgreTable
.
class
,
PostgreConstants
.
COL_TABLE_NAME
,
PostgreConstants
.
COL_CONSTRAINT_NAME
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTable.java
浏览文件 @
b9816c62
...
...
@@ -366,7 +366,7 @@ public class PostgreTable extends PostgreTableBase
@Override
public
String
getObjectDefinitionText
(
DBRProgressMonitor
monitor
)
throws
DBException
{
return
getDDL
(
monitor
)
;
return
""
;
}
@Override
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableBase.java
浏览文件 @
b9816c62
...
...
@@ -20,30 +20,25 @@ package org.jkiss.dbeaver.ext.postgresql.model;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.model.DBPNamedObject2
;
import
org.jkiss.dbeaver.model.DBPRefreshableObject
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCSession
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCStructCache
;
import
org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCTable
;
import
org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCTableColumn
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
java.io.UnsupportedEncodingException
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.Collection
;
/**
* PostgreTable base
*/
public
abstract
class
PostgreTableBase
extends
JDBCTable
<
PostgreDataSource
,
PostgreSchema
>
implements
DBPNamedObject2
,
DBPRefreshableObject
,
PostgreScriptObject
public
abstract
class
PostgreTableBase
extends
JDBCTable
<
PostgreDataSource
,
PostgreSchema
>
implements
PostgreClass
,
PostgreScriptObject
{
static
final
Log
log
=
Log
.
getLog
(
PostgreTableBase
.
class
);
private
int
oid
;
protected
PostgreTableBase
(
PostgreSchema
catalog
)
{
super
(
catalog
,
false
);
...
...
@@ -53,13 +48,19 @@ public abstract class PostgreTableBase extends JDBCTable<PostgreDataSource, Post
PostgreSchema
catalog
,
ResultSet
dbResult
)
{
super
(
catalog
,
JDBCUtils
.
safeGetString
(
dbResult
,
1
),
true
);
super
(
catalog
,
JDBCUtils
.
safeGetString
(
dbResult
,
"relname"
),
true
);
this
.
oid
=
JDBCUtils
.
safeGetInt
(
dbResult
,
"oid"
);
}
@Override
public
JDBCStructCache
<
PostgreSchema
,
?
extends
JDBCTable
,
?
extends
JDBCTableColumn
>
getCache
()
{
return
getContainer
().
tableCache
;
return
getContainer
().
classCache
;
}
@Override
public
int
getObjectId
()
{
return
this
.
oid
;
}
@NotNull
...
...
@@ -75,58 +76,21 @@ public abstract class PostgreTableBase extends JDBCTable<PostgreDataSource, Post
public
Collection
<
PostgreTableColumn
>
getAttributes
(
DBRProgressMonitor
monitor
)
throws
DBException
{
return
getContainer
().
table
Cache
.
getChildren
(
monitor
,
getContainer
(),
this
);
return
getContainer
().
class
Cache
.
getChildren
(
monitor
,
getContainer
(),
this
);
}
@Override
public
PostgreTableColumn
getAttribute
(
DBRProgressMonitor
monitor
,
String
attributeName
)
throws
DBException
{
return
getContainer
().
table
Cache
.
getChild
(
monitor
,
getContainer
(),
this
,
attributeName
);
return
getContainer
().
class
Cache
.
getChild
(
monitor
,
getContainer
(),
this
,
attributeName
);
}
@Override
public
boolean
refreshObject
(
@NotNull
DBRProgressMonitor
monitor
)
throws
DBException
{
getContainer
().
table
Cache
.
clearChildrenCache
(
this
);
getContainer
().
class
Cache
.
clearChildrenCache
(
this
);
return
true
;
}
public
String
getDDL
(
DBRProgressMonitor
monitor
)
throws
DBException
{
if
(!
isPersisted
())
{
return
""
;
}
try
(
JDBCSession
session
=
DBUtils
.
openMetaSession
(
monitor
,
getDataSource
(),
"Retrieve table DDL"
))
{
try
(
PreparedStatement
dbStat
=
session
.
prepareStatement
(
"SHOW CREATE "
+
(
isView
()
?
"VIEW"
:
"TABLE"
)
+
" "
+
getFullQualifiedName
()))
{
try
(
ResultSet
dbResult
=
dbStat
.
executeQuery
())
{
if
(
dbResult
.
next
())
{
byte
[]
ddl
;
if
(
isView
())
{
ddl
=
dbResult
.
getBytes
(
"Create View"
);
}
else
{
ddl
=
dbResult
.
getBytes
(
"Create Table"
);
}
if
(
ddl
==
null
)
{
return
null
;
}
else
{
try
{
return
new
String
(
ddl
,
getContainer
().
getDefaultCharset
().
getName
());
}
catch
(
UnsupportedEncodingException
e
)
{
log
.
debug
(
e
);
return
new
String
(
ddl
);
}
}
}
else
{
return
"DDL is not available"
;
}
}
}
}
catch
(
SQLException
ex
)
{
throw
new
DBException
(
ex
,
getDataSource
());
}
}
}
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableColumn.java
浏览文件 @
b9816c62
...
...
@@ -91,8 +91,8 @@ public class PostgreTableColumn extends JDBCTableColumn<PostgreTableBase> implem
private
void
loadInfo
(
ResultSet
dbResult
)
throws
DBException
{
setName
(
JDBCUtils
.
safeGetString
(
dbResult
,
PostgreConstants
.
COL_COLUMN_NAME
));
setOrdinalPosition
(
JDBCUtils
.
safeGetInt
(
dbResult
,
PostgreConstants
.
COL_ORDINAL_POSITION
));
setName
(
JDBCUtils
.
safeGetString
(
dbResult
,
"attname"
));
setOrdinalPosition
(
JDBCUtils
.
safeGetInt
(
dbResult
,
"attnum"
));
String
typeName
=
JDBCUtils
.
safeGetString
(
dbResult
,
PostgreConstants
.
COL_DATA_TYPE
);
assert
typeName
!=
null
;
String
keyTypeName
=
JDBCUtils
.
safeGetString
(
dbResult
,
PostgreConstants
.
COL_COLUMN_KEY
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录