Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
70281887
提交
70281887
authored
5月 17, 2012
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The SCRIPT statements now supports filtering by schema and table.
上级
6edfc680
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
7 行增加
和
25 行删除
+7
-25
help.csv
h2/src/docsrc/help/help.csv
+1
-3
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
Parser.java
h2/src/main/org/h2/command/Parser.java
+3
-5
ScriptCommand.java
h2/src/main/org/h2/command/dml/ScriptCommand.java
+2
-16
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
70281887
...
...
@@ -172,9 +172,7 @@ The password must be in single quotes; it is case sensitive and can contain spac
This command locks objects while it is running.
TABLE will dump the DDL only for the selected table.
SCHEMA will dump the DDL only for objects in the selected schema.
When using the TABLE or SCHEMA option, only the selected table(s) / schema(s) are included.
","
SCRIPT NODATA
"
...
...
h2/src/docsrc/html/changelog.html
浏览文件 @
70281887
...
...
@@ -42,7 +42,7 @@ Change Log
</li><li>
TRUNC was added as an alias for TRUNCATE.
</li><li>
Small optimisation for accessing result values by column name.
</li><li>
Fix for bug in Statement#getMoreResults(int)
</li><li>
Jacob Qvortrup
<jfq
@
arosii
.
dk
>
added SCRIPT TABLE and SCRIPT SCHEMA extensions(int)
</li><li>
The SCRIPT statements now supports filtering by schema and table. Thanks a lot to Jacob Qvortrup for providing the patch!
</li></ul>
<h2>
Version 1.3.166 (2012-04-08)
</h2>
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
70281887
...
...
@@ -10,7 +10,6 @@ import java.math.BigDecimal;
import
java.math.BigInteger
;
import
java.text.Collator
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
org.h2.api.Trigger
;
import
org.h2.command.ddl.AlterIndexRename
;
...
...
@@ -4691,16 +4690,15 @@ public class Parser {
ScriptCommand
command
=
new
ScriptCommand
(
session
);
boolean
data
=
true
,
passwords
=
true
,
settings
=
true
,
dropTables
=
false
,
simple
=
false
;
if
(
readIf
(
"SCHEMA"
))
{
java
.
util
.
Set
<
String
>
schemaNames
=
new
HashSet
<
String
>
();
HashSet
<
String
>
schemaNames
=
New
.
hashSet
();
do
{
schemaNames
.
add
(
readUniqueIdentifier
());
}
while
(
readIf
(
","
));
command
.
setSchemaNames
(
schemaNames
);
}
else
if
(
readIf
(
"TABLE"
))
{
Collection
<
Table
>
tables
=
new
ArrayList
<
Table
>
();
ArrayList
<
Table
>
tables
=
New
.
arrayList
();
do
{
Table
table
=
readTableOrView
();
tables
.
add
(
table
);
tables
.
add
(
readTableOrView
());
}
while
(
readIf
(
","
));
command
.
setTables
(
tables
);
}
...
...
h2/src/main/org/h2/command/dml/ScriptCommand.java
浏览文件 @
70281887
...
...
@@ -616,25 +616,11 @@ public class ScriptCommand extends ScriptBase {
}
private
boolean
excludeSchema
(
Schema
schema
)
{
if
(
this
.
schemaNames
!=
null
&&
!
this
.
schemaNames
.
contains
(
schema
.
getName
()))
{
return
true
;
}
if
(
this
.
tables
!=
null
)
{
boolean
containsTable
=
false
;
for
(
Table
table
:
schema
.
getAllTablesAndViews
())
{
if
(
tables
.
contains
(
table
))
{
table
.
checkSupportAlter
();
// This may not be the correct way to ensure that only real tables can be used as arguments.
containsTable
=
true
;
}
}
if
(!
containsTable
)
return
true
;
}
return
false
;
return
schemaNames
!=
null
&&
!
schemaNames
.
contains
(
schema
.
getName
());
}
private
boolean
excludeTable
(
Table
table
)
{
return
t
his
.
tables
!=
null
&&
!
this
.
tables
.
contains
(
table
);
return
t
ables
!=
null
&&
!
tables
.
contains
(
table
);
}
private
void
add
(
String
s
,
boolean
insert
)
throws
IOException
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论