Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e811cab7
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,发现更多精彩内容 >>
提交
e811cab7
编写于
4月 23, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#1956 PostgreSQL tablespace edit. WITH OID edit.
上级
6513a529
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
79 addition
and
34 deletion
+79
-34
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/manager/DB2TableManager.java
...rc/org/jkiss/dbeaver/ext/db2/manager/DB2TableManager.java
+2
-2
plugins/org.jkiss.dbeaver.ext.exasol/src/org/jkiss/dbeaver/ext/exasol/manager/ExasolTableManager.java
.../jkiss/dbeaver/ext/exasol/manager/ExasolTableManager.java
+2
-2
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/edit/MySQLTableManager.java
...c/org/jkiss/dbeaver/ext/mysql/edit/MySQLTableManager.java
+2
-2
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/edit/OracleTableManager.java
...org/jkiss/dbeaver/ext/oracle/edit/OracleTableManager.java
+2
-2
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleTablePhysical.java
...g/jkiss/dbeaver/ext/oracle/model/OracleTablePhysical.java
+2
-4
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/edit/PostgreTableManager.java
...kiss/dbeaver/ext/postgresql/edit/PostgreTableManager.java
+36
-18
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTable.java
.../org/jkiss/dbeaver/ext/postgresql/model/PostgreTable.java
+31
-2
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/sql/edit/struct/SQLTableManager.java
...s/dbeaver/model/impl/sql/edit/struct/SQLTableManager.java
+2
-2
未找到文件。
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/manager/DB2TableManager.java
浏览文件 @
e811cab7
...
@@ -101,7 +101,7 @@ public class DB2TableManager extends SQLTableManager<DB2Table, DB2Schema> implem
...
@@ -101,7 +101,7 @@ public class DB2TableManager extends SQLTableManager<DB2Table, DB2Schema> implem
@Override
@Override
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
"rawtypes"
)
public
void
appendTableModifiers
(
DB2Table
db2Table
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
)
public
void
appendTableModifiers
(
DB2Table
db2Table
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
,
boolean
alter
)
{
{
try
{
try
{
...
@@ -164,7 +164,7 @@ public class DB2TableManager extends SQLTableManager<DB2Table, DB2Schema> implem
...
@@ -164,7 +164,7 @@ public class DB2TableManager extends SQLTableManager<DB2Table, DB2Schema> implem
sb
.
append
(
db2Table
.
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
));
sb
.
append
(
db2Table
.
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
));
sb
.
append
(
" "
);
sb
.
append
(
" "
);
appendTableModifiers
(
command
.
getObject
(),
command
,
sb
);
appendTableModifiers
(
command
.
getObject
(),
command
,
sb
,
true
);
actionList
.
add
(
new
SQLDatabasePersistAction
(
CMD_ALTER
,
sb
.
toString
()));
actionList
.
add
(
new
SQLDatabasePersistAction
(
CMD_ALTER
,
sb
.
toString
()));
}
}
...
...
plugins/org.jkiss.dbeaver.ext.exasol/src/org/jkiss/dbeaver/ext/exasol/manager/ExasolTableManager.java
浏览文件 @
e811cab7
...
@@ -89,7 +89,7 @@ public class ExasolTableManager extends SQLTableManager<ExasolTable, ExasolSchem
...
@@ -89,7 +89,7 @@ public class ExasolTableManager extends SQLTableManager<ExasolTable, ExasolSchem
@Override
@Override
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
"rawtypes"
)
public
void
appendTableModifiers
(
ExasolTable
exasolTable
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
)
{
public
void
appendTableModifiers
(
ExasolTable
exasolTable
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
,
boolean
alter
)
{
}
}
...
@@ -117,7 +117,7 @@ public class ExasolTableManager extends SQLTableManager<ExasolTable, ExasolSchem
...
@@ -117,7 +117,7 @@ public class ExasolTableManager extends SQLTableManager<ExasolTable, ExasolSchem
sb
.
append
(
exasolTable
.
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
));
sb
.
append
(
exasolTable
.
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
));
sb
.
append
(
" "
);
sb
.
append
(
" "
);
appendTableModifiers
(
command
.
getObject
(),
command
,
sb
);
appendTableModifiers
(
command
.
getObject
(),
command
,
sb
,
true
);
actionList
.
add
(
new
SQLDatabasePersistAction
(
CMD_ALTER
,
sb
.
toString
()));
actionList
.
add
(
new
SQLDatabasePersistAction
(
CMD_ALTER
,
sb
.
toString
()));
}
}
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/edit/MySQLTableManager.java
浏览文件 @
e811cab7
...
@@ -90,7 +90,7 @@ public class MySQLTableManager extends SQLTableManager<MySQLTableBase, MySQLCata
...
@@ -90,7 +90,7 @@ public class MySQLTableManager extends SQLTableManager<MySQLTableBase, MySQLCata
{
{
StringBuilder
query
=
new
StringBuilder
(
"ALTER TABLE "
);
//$NON-NLS-1$
StringBuilder
query
=
new
StringBuilder
(
"ALTER TABLE "
);
//$NON-NLS-1$
query
.
append
(
command
.
getObject
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
)).
append
(
" "
);
//$NON-NLS-1$
query
.
append
(
command
.
getObject
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
)).
append
(
" "
);
//$NON-NLS-1$
appendTableModifiers
(
command
.
getObject
(),
command
,
query
);
appendTableModifiers
(
command
.
getObject
(),
command
,
query
,
true
);
actionList
.
add
(
actionList
.
add
(
new
SQLDatabasePersistAction
(
query
.
toString
())
new
SQLDatabasePersistAction
(
query
.
toString
())
...
@@ -111,7 +111,7 @@ public class MySQLTableManager extends SQLTableManager<MySQLTableBase, MySQLCata
...
@@ -111,7 +111,7 @@ public class MySQLTableManager extends SQLTableManager<MySQLTableBase, MySQLCata
}
}
@Override
@Override
protected
void
appendTableModifiers
(
MySQLTableBase
tableBase
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
)
protected
void
appendTableModifiers
(
MySQLTableBase
tableBase
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
,
boolean
alter
)
{
{
if
(
tableBase
instanceof
MySQLTable
)
{
if
(
tableBase
instanceof
MySQLTable
)
{
MySQLTable
table
=(
MySQLTable
)
tableBase
;
MySQLTable
table
=(
MySQLTable
)
tableBase
;
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/edit/OracleTableManager.java
浏览文件 @
e811cab7
...
@@ -75,7 +75,7 @@ public class OracleTableManager extends SQLTableManager<OracleTable, OracleSchem
...
@@ -75,7 +75,7 @@ public class OracleTableManager extends SQLTableManager<OracleTable, OracleSchem
if
(
command
.
getProperties
().
size
()
>
1
||
command
.
getProperty
(
"comment"
)
==
null
)
{
if
(
command
.
getProperties
().
size
()
>
1
||
command
.
getProperty
(
"comment"
)
==
null
)
{
StringBuilder
query
=
new
StringBuilder
(
"ALTER TABLE "
);
//$NON-NLS-1$
StringBuilder
query
=
new
StringBuilder
(
"ALTER TABLE "
);
//$NON-NLS-1$
query
.
append
(
command
.
getObject
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
)).
append
(
" "
);
//$NON-NLS-1$
query
.
append
(
command
.
getObject
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
)).
append
(
" "
);
//$NON-NLS-1$
appendTableModifiers
(
command
.
getObject
(),
command
,
query
);
appendTableModifiers
(
command
.
getObject
(),
command
,
query
,
true
);
actionList
.
add
(
new
SQLDatabasePersistAction
(
query
.
toString
()));
actionList
.
add
(
new
SQLDatabasePersistAction
(
query
.
toString
()));
}
}
}
}
...
@@ -91,7 +91,7 @@ public class OracleTableManager extends SQLTableManager<OracleTable, OracleSchem
...
@@ -91,7 +91,7 @@ public class OracleTableManager extends SQLTableManager<OracleTable, OracleSchem
}
}
@Override
@Override
protected
void
appendTableModifiers
(
OracleTable
table
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
)
protected
void
appendTableModifiers
(
OracleTable
table
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
,
boolean
alter
)
{
{
// ALTER
// ALTER
if
(
tableProps
.
getProperty
(
"tablespace"
)
!=
null
)
{
//$NON-NLS-1$
if
(
tableProps
.
getProperty
(
"tablespace"
)
!=
null
)
{
//$NON-NLS-1$
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/model/OracleTablePhysical.java
浏览文件 @
e811cab7
...
@@ -269,13 +269,11 @@ public abstract class OracleTablePhysical extends OracleTableBase implements DBS
...
@@ -269,13 +269,11 @@ public abstract class OracleTablePhysical extends OracleTableBase implements DBS
{
{
final
List
<
OracleTablespace
>
tablespaces
=
new
ArrayList
<>();
final
List
<
OracleTablespace
>
tablespaces
=
new
ArrayList
<>();
try
{
try
{
for
(
OracleTablespace
ts
:
object
.
getDataSource
().
getTablespaces
(
new
VoidProgressMonitor
()))
{
tablespaces
.
addAll
(
object
.
getDataSource
().
getTablespaces
(
new
VoidProgressMonitor
()));
tablespaces
.
add
(
ts
);
}
}
catch
(
DBException
e
)
{
}
catch
(
DBException
e
)
{
log
.
error
(
e
);
log
.
error
(
e
);
}
}
Collections
.
sort
(
tablespaces
,
DBUtils
.<
OracleTablespace
>
nameComparator
());
tablespaces
.
sort
(
DBUtils
.<
OracleTablespace
>
nameComparator
());
return
tablespaces
.
toArray
(
new
OracleTablespace
[
tablespaces
.
size
()]);
return
tablespaces
.
toArray
(
new
OracleTablespace
[
tablespaces
.
size
()]);
}
}
}
}
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/edit/PostgreTableManager.java
浏览文件 @
e811cab7
...
@@ -20,6 +20,7 @@ import org.jkiss.code.NotNull;
...
@@ -20,6 +20,7 @@ import org.jkiss.code.NotNull;
import
org.jkiss.code.Nullable
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.ext.postgresql.model.*
;
import
org.jkiss.dbeaver.ext.postgresql.model.*
;
import
org.jkiss.dbeaver.model.DBConstants
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.DBPEvaluationContext
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.edit.DBECommandContext
;
import
org.jkiss.dbeaver.model.edit.DBECommandContext
;
...
@@ -71,41 +72,58 @@ public class PostgreTableManager extends PostgreTableManagerBase implements DBEO
...
@@ -71,41 +72,58 @@ public class PostgreTableManager extends PostgreTableManagerBase implements DBEO
@Override
@Override
protected
void
addObjectModifyActions
(
List
<
DBEPersistAction
>
actionList
,
ObjectChangeCommand
command
,
Map
<
String
,
Object
>
options
)
protected
void
addObjectModifyActions
(
List
<
DBEPersistAction
>
actionList
,
ObjectChangeCommand
command
,
Map
<
String
,
Object
>
options
)
{
{
final
PostgreTableBase
table
=
command
.
getObject
();
if
(
command
.
getProperties
().
size
()
>
1
||
command
.
getProperty
(
DBConstants
.
PROP_ID_DESCRIPTION
)
==
null
)
{
if
(
command
.
getProperties
().
size
()
>
1
||
command
.
getProperty
(
"description"
)
==
null
)
{
if
(
command
.
getObject
()
instanceof
PostgreTableRegular
)
{
StringBuilder
query
=
new
StringBuilder
(
"ALTER TABLE "
);
//$NON-NLS-1$
try
{
query
.
append
(
table
.
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
)).
append
(
" "
);
//$NON-NLS-1$
generateAlterActions
(
actionList
,
command
);
appendTableModifiers
(
table
,
command
,
query
);
}
catch
(
DBException
e
)
{
log
.
error
(
e
);
}
}
}
}
actionList
.
add
(
new
SQLDatabasePersistAction
(
query
.
toString
()));
private
void
generateAlterActions
(
List
<
DBEPersistAction
>
actionList
,
ObjectChangeCommand
command
)
throws
DBException
{
final
PostgreTableRegular
table
=
(
PostgreTableRegular
)
command
.
getObject
();
final
String
alterPrefix
=
"ALTER TABLE "
+
command
.
getObject
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
)
+
" "
;
final
VoidProgressMonitor
monitor
=
new
VoidProgressMonitor
();
if
(
command
.
getProperty
(
"hasOids"
)
!=
null
)
{
actionList
.
add
(
new
SQLDatabasePersistAction
(
alterPrefix
+
(
table
.
isHasOids
()
?
"SET WITH OIDS"
:
"SET WITHOUT OIDS"
)));
}
if
(
command
.
getProperty
(
"tablespace"
)
!=
null
)
{
actionList
.
add
(
new
SQLDatabasePersistAction
(
alterPrefix
+
"SET TABLESPACE "
+
table
.
getTablespace
(
monitor
).
getName
()));
}
}
}
}
@Override
@Override
protected
void
appendTableModifiers
(
PostgreTableBase
tableBase
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
)
protected
void
appendTableModifiers
(
PostgreTableBase
tableBase
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
,
boolean
alter
)
{
{
if
(
tableBase
instanceof
PostgreTableRegular
)
{
if
(
tableBase
instanceof
PostgreTableRegular
)
{
final
VoidProgressMonitor
monitor
=
new
VoidProgressMonitor
();
final
VoidProgressMonitor
monitor
=
new
VoidProgressMonitor
();
PostgreTableRegular
table
=(
PostgreTableRegular
)
tableBase
;
PostgreTableRegular
table
=(
PostgreTableRegular
)
tableBase
;
try
{
try
{
final
List
<
PostgreTableInheritance
>
superTables
=
table
.
getSuperInheritance
(
monitor
);
if
(!
alter
)
{
if
(!
CommonUtils
.
isEmpty
(
superTables
))
{
final
List
<
PostgreTableInheritance
>
superTables
=
table
.
getSuperInheritance
(
monitor
);
ddl
.
append
(
"\nINHERITS ("
);
if
(!
CommonUtils
.
isEmpty
(
superTables
))
{
for
(
int
i
=
0
;
i
<
superTables
.
size
();
i
++)
{
ddl
.
append
(
"\nINHERITS ("
);
if
(
i
>
0
)
ddl
.
append
(
","
);
for
(
int
i
=
0
;
i
<
superTables
.
size
();
i
++)
{
ddl
.
append
(
superTables
.
get
(
i
).
getAssociatedEntity
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
));
if
(
i
>
0
)
ddl
.
append
(
","
);
ddl
.
append
(
superTables
.
get
(
i
).
getAssociatedEntity
().
getFullyQualifiedName
(
DBPEvaluationContext
.
DDL
));
}
ddl
.
append
(
")"
);
}
}
ddl
.
append
(
")"
);
ddl
.
append
(
"\nWITH (\n\tOIDS="
).
append
(
table
.
isHasOids
()
?
"TRUE"
:
"FALSE"
);
ddl
.
append
(
"\n)"
);
}
}
ddl
.
append
(
"\nWITH (\n\tOIDS="
).
append
(
table
.
isHasOids
()
?
"TRUE"
:
"FALSE"
);
ddl
.
append
(
"\n)"
);
boolean
hasOtherSpecs
=
false
;
boolean
hasOtherSpecs
=
false
;
PostgreTablespace
tablespace
=
table
.
getTablespace
(
monitor
);
PostgreTablespace
tablespace
=
table
.
getTablespace
(
monitor
);
if
(
tablespace
!=
null
&&
table
.
isTablespaceSpecified
())
{
if
(
tablespace
!=
null
&&
table
.
isTablespaceSpecified
())
{
ddl
.
append
(
"\nTABLESPACE "
).
append
(
tablespace
.
getName
());
if
(!
alter
)
{
ddl
.
append
(
"\nTABLESPACE "
).
append
(
tablespace
.
getName
());
}
hasOtherSpecs
=
true
;
hasOtherSpecs
=
true
;
}
}
if
(
hasOtherSpecs
)
{
if
(
!
alter
&&
hasOtherSpecs
)
{
ddl
.
append
(
"\n"
);
ddl
.
append
(
"\n"
);
}
}
}
catch
(
DBException
e
)
{
}
catch
(
DBException
e
)
{
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTable.java
浏览文件 @
e811cab7
...
@@ -31,8 +31,10 @@ import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
...
@@ -31,8 +31,10 @@ import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
import
org.jkiss.dbeaver.model.impl.SimpleObjectCache
;
import
org.jkiss.dbeaver.model.impl.SimpleObjectCache
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.meta.Association
;
import
org.jkiss.dbeaver.model.meta.Association
;
import
org.jkiss.dbeaver.model.meta.IPropertyValueListProvider
;
import
org.jkiss.dbeaver.model.meta.Property
;
import
org.jkiss.dbeaver.model.meta.Property
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.runtime.VoidProgressMonitor
;
import
org.jkiss.dbeaver.model.struct.DBSEntity
;
import
org.jkiss.dbeaver.model.struct.DBSEntity
;
import
org.jkiss.dbeaver.model.struct.DBSEntityAssociation
;
import
org.jkiss.dbeaver.model.struct.DBSEntityAssociation
;
import
org.jkiss.utils.CommonUtils
;
import
org.jkiss.utils.CommonUtils
;
...
@@ -89,7 +91,7 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
...
@@ -89,7 +91,7 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
return
tablespaceId
!=
0
;
return
tablespaceId
!=
0
;
}
}
@Property
(
viewable
=
true
,
order
=
20
)
@Property
(
viewable
=
true
,
editable
=
true
,
updatable
=
true
,
order
=
20
,
listProvider
=
TablespaceListProvider
.
class
)
public
PostgreTablespace
getTablespace
(
DBRProgressMonitor
monitor
)
throws
DBException
{
public
PostgreTablespace
getTablespace
(
DBRProgressMonitor
monitor
)
throws
DBException
{
if
(
tablespaceId
==
0
)
{
if
(
tablespaceId
==
0
)
{
return
getDatabase
().
getDefaultTablespace
(
monitor
);
return
getDatabase
().
getDefaultTablespace
(
monitor
);
...
@@ -97,17 +99,25 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
...
@@ -97,17 +99,25 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
return
PostgreUtils
.
getObjectById
(
monitor
,
getDatabase
().
tablespaceCache
,
getDatabase
(),
tablespaceId
);
return
PostgreUtils
.
getObjectById
(
monitor
,
getDatabase
().
tablespaceCache
,
getDatabase
(),
tablespaceId
);
}
}
public
void
setTablespace
(
PostgreTablespace
tablespace
)
{
this
.
tablespaceId
=
tablespace
.
getObjectId
();
}
@Override
@Override
public
boolean
isView
()
public
boolean
isView
()
{
{
return
false
;
return
false
;
}
}
@Property
(
viewable
=
false
,
order
=
40
)
@Property
(
viewable
=
false
,
editable
=
true
,
updatable
=
true
,
order
=
40
)
public
boolean
isHasOids
()
{
public
boolean
isHasOids
()
{
return
hasOids
;
return
hasOids
;
}
}
public
void
setHasOids
(
boolean
hasOids
)
{
this
.
hasOids
=
hasOids
;
}
@Override
@Override
public
Collection
<
PostgreIndex
>
getIndexes
(
DBRProgressMonitor
monitor
)
throws
DBException
{
public
Collection
<
PostgreIndex
>
getIndexes
(
DBRProgressMonitor
monitor
)
throws
DBException
{
return
getSchema
().
indexCache
.
getObjects
(
monitor
,
getSchema
(),
this
);
return
getSchema
().
indexCache
.
getObjects
(
monitor
,
getSchema
(),
this
);
...
@@ -308,4 +318,23 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
...
@@ -308,4 +318,23 @@ public abstract class PostgreTable extends PostgreTableReal implements DBDPseudo
return
result
;
return
result
;
}
}
public
static
class
TablespaceListProvider
implements
IPropertyValueListProvider
<
PostgreTable
>
{
@Override
public
boolean
allowCustomValue
()
{
return
false
;
}
@Override
public
Object
[]
getPossibleValues
(
PostgreTable
object
)
{
try
{
Collection
<
PostgreTablespace
>
tablespaces
=
object
.
getDatabase
().
getTablespaces
(
new
VoidProgressMonitor
());
return
tablespaces
.
toArray
(
new
Object
[
tablespaces
.
size
()]);
}
catch
(
DBException
e
)
{
log
.
error
(
e
);
return
new
Object
[
0
];
}
}
}
}
}
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/sql/edit/struct/SQLTableManager.java
浏览文件 @
e811cab7
...
@@ -128,7 +128,7 @@ public abstract class SQLTableManager<OBJECT_TYPE extends JDBCTable, CONTAINER_T
...
@@ -128,7 +128,7 @@ public abstract class SQLTableManager<OBJECT_TYPE extends JDBCTable, CONTAINER_T
}
}
createQuery
.
append
(
lineSeparator
).
append
(
")"
);
//$NON-NLS-1$
createQuery
.
append
(
lineSeparator
).
append
(
")"
);
//$NON-NLS-1$
appendTableModifiers
(
table
,
tableProps
,
createQuery
);
appendTableModifiers
(
table
,
tableProps
,
createQuery
,
false
);
actions
.
add
(
0
,
new
SQLDatabasePersistAction
(
ModelMessages
.
model_jdbc_create_new_table
,
createQuery
.
toString
())
);
actions
.
add
(
0
,
new
SQLDatabasePersistAction
(
ModelMessages
.
model_jdbc_create_new_table
,
createQuery
.
toString
())
);
}
}
...
@@ -151,7 +151,7 @@ public abstract class SQLTableManager<OBJECT_TYPE extends JDBCTable, CONTAINER_T
...
@@ -151,7 +151,7 @@ public abstract class SQLTableManager<OBJECT_TYPE extends JDBCTable, CONTAINER_T
);
);
}
}
protected
void
appendTableModifiers
(
OBJECT_TYPE
table
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
)
protected
void
appendTableModifiers
(
OBJECT_TYPE
table
,
NestedObjectCommand
tableProps
,
StringBuilder
ddl
,
boolean
alter
)
{
{
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录