Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
63e0663c
提交
63e0663c
authored
1月 18, 2017
作者:
Alexander Paschenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Issue #434 - doc updated, test added.
上级
18657cb7
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
1 行删除
+12
-1
help.csv
h2/src/docsrc/help/help.csv
+5
-1
TestTableEngines.java
h2/src/test/org/h2/test/db/TestTableEngines.java
+7
-0
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
63e0663c
...
@@ -613,7 +613,8 @@ CREATE SEQUENCE SEQ_ID
...
@@ -613,7 +613,8 @@ CREATE SEQUENCE SEQ_ID
CREATE [ CACHED | MEMORY ] [ TEMP | [ GLOBAL | LOCAL ] TEMPORARY ]
CREATE [ CACHED | MEMORY ] [ TEMP | [ GLOBAL | LOCAL ] TEMPORARY ]
TABLE [ IF NOT EXISTS ] name
TABLE [ IF NOT EXISTS ] name
[ ( { columnDefinition | constraint } [,...] ) ]
[ ( { columnDefinition | constraint } [,...] ) ]
[ ENGINE tableEngineName [ WITH tableEngineParamName [,...] ] ]
[ ENGINE tableEngineName ]
[ WITH tableEngineParamName [,...] ]
[ NOT PERSISTENT ] [ TRANSACTIONAL ]
[ NOT PERSISTENT ] [ TRANSACTIONAL ]
[ AS select ]","
[ AS select ]","
Creates a new table.
Creates a new table.
...
@@ -635,6 +636,9 @@ The ENGINE option is only required when custom table implementations are used.
...
@@ -635,6 +636,9 @@ The ENGINE option is only required when custom table implementations are used.
The table engine class must implement the interface ""org.h2.api.TableEngine"".
The table engine class must implement the interface ""org.h2.api.TableEngine"".
Any table engine parameters are passed down in the tableEngineParams field of the CreateTableData object.
Any table engine parameters are passed down in the tableEngineParams field of the CreateTableData object.
Either ENGINE, or WITH (table engine params), or both may be specified. If ENGINE is not specified
in CREATE TABLE, then the engine specified by DEFAULT_TABLE_ENGINE option of database params is used.
Tables with the NOT PERSISTENT modifier are kept fully in memory, and all
Tables with the NOT PERSISTENT modifier are kept fully in memory, and all
rows are lost when the database is closed.
rows are lost when the database is closed.
...
...
h2/src/test/org/h2/test/db/TestTableEngines.java
浏览文件 @
63e0663c
...
@@ -104,6 +104,13 @@ public class TestTableEngines extends TestBase {
...
@@ -104,6 +104,13 @@ public class TestTableEngines extends TestBase {
Statement
stat
=
conn
.
createStatement
();
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE TABLE t1(id int, name varchar) ENGINE \""
+
stat
.
execute
(
"CREATE TABLE t1(id int, name varchar) ENGINE \""
+
EndlessTableEngine
.
class
.
getName
()
+
"\" WITH \"param1\", \"param2\""
);
EndlessTableEngine
.
class
.
getName
()
+
"\" WITH \"param1\", \"param2\""
);
assertEquals
(
2
,
EndlessTableEngine
.
createTableData
.
tableEngineParams
.
size
());
assertEquals
(
"param1"
,
EndlessTableEngine
.
createTableData
.
tableEngineParams
.
get
(
0
));
assertEquals
(
"param2"
,
EndlessTableEngine
.
createTableData
.
tableEngineParams
.
get
(
1
));
stat
.
execute
(
"CREATE TABLE t2(id int, name varchar) WITH \"param1\", \"param2\""
);
assertEquals
(
2
,
assertEquals
(
2
,
EndlessTableEngine
.
createTableData
.
tableEngineParams
.
size
());
EndlessTableEngine
.
createTableData
.
tableEngineParams
.
size
());
assertEquals
(
"param1"
,
assertEquals
(
"param1"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论