Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
677a9793
提交
677a9793
authored
6月 02, 2015
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting
上级
2937be4a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
58 行增加
和
61 行删除
+58
-61
help.csv
h2/src/main/org/h2/res/help.csv
+1
-1
TestUsingIndex.java
h2/src/test/org/h2/test/db/TestUsingIndex.java
+55
-58
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+2
-1
ImmutableArray.java
h2/src/tools/org/h2/dev/util/ImmutableArray.java
+0
-1
没有找到文件。
h2/src/main/org/h2/res/help.csv
浏览文件 @
677a9793
...
@@ -1024,7 +1024,7 @@ HASH(algorithmString, dataBytes, iterationInt)
...
@@ -1024,7 +1024,7 @@ HASH(algorithmString, dataBytes, iterationInt)
","
","
Calculate the hash value using an algorithm, and repeat this process for a number of iterations."
Calculate the hash value using an algorithm, and repeat this process for a number of iterations."
"Functions (Numeric)","TRUNCATE","
"Functions (Numeric)","TRUNCATE","
{ TRUNC | TRUNCATE } ( { {numeric, digitsInt} | timestamp } )
{ TRUNC | TRUNCATE } ( { {numeric, digitsInt} | timestamp
| date | timestampString
} )
","
","
Truncates to a number of digits (to the next value closer to 0)."
Truncates to a number of digits (to the next value closer to 0)."
"Functions (Numeric)","COMPRESS","
"Functions (Numeric)","COMPRESS","
...
...
h2/src/test/org/h2/test/db/TestUsingIndex.java
浏览文件 @
677a9793
...
@@ -67,11 +67,16 @@ public class TestUsingIndex extends TestBase {
...
@@ -67,11 +67,16 @@ public class TestUsingIndex extends TestBase {
conn
=
getConnection
(
"using_index"
);
conn
=
getConnection
(
"using_index"
);
stat
=
conn
.
createStatement
();
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test(id int)"
);
stat
.
execute
(
"create table test(id int)"
);
assertFalse
(
isSupportedSyntax
(
stat
,
"create hash index idx_name_1 on test(id) using hash"
));
assertFalse
(
isSupportedSyntax
(
stat
,
assertFalse
(
isSupportedSyntax
(
stat
,
"create hash index idx_name_2 on test(id) using btree"
));
"create hash index idx_name_1 on test(id) using hash"
));
assertFalse
(
isSupportedSyntax
(
stat
,
"create index idx_name_3 on test(id) using hash_tree"
));
assertFalse
(
isSupportedSyntax
(
stat
,
assertFalse
(
isSupportedSyntax
(
stat
,
"create unique hash index idx_name_4 on test(id) using hash"
));
"create hash index idx_name_2 on test(id) using btree"
));
assertFalse
(
isSupportedSyntax
(
stat
,
"create index idx_name_5 on test(id) using hash table"
));
assertFalse
(
isSupportedSyntax
(
stat
,
"create index idx_name_3 on test(id) using hash_tree"
));
assertFalse
(
isSupportedSyntax
(
stat
,
"create unique hash index idx_name_4 on test(id) using hash"
));
assertFalse
(
isSupportedSyntax
(
stat
,
"create index idx_name_5 on test(id) using hash table"
));
conn
.
close
();
conn
.
close
();
deleteDb
(
"using_index"
);
deleteDb
(
"using_index"
);
}
}
...
@@ -80,9 +85,12 @@ public class TestUsingIndex extends TestBase {
...
@@ -80,9 +85,12 @@ public class TestUsingIndex extends TestBase {
conn
=
getConnection
(
"using_index"
);
conn
=
getConnection
(
"using_index"
);
stat
=
conn
.
createStatement
();
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test(id int)"
);
stat
.
execute
(
"create table test(id int)"
);
assertTrue
(
isSupportedSyntax
(
stat
,
"create index idx_name_1 on test(id) using hash"
));
assertTrue
(
isSupportedSyntax
(
stat
,
assertTrue
(
isSupportedSyntax
(
stat
,
"create index idx_name_2 on test(id) using btree"
));
"create index idx_name_1 on test(id) using hash"
));
assertTrue
(
isSupportedSyntax
(
stat
,
"create unique index idx_name_3 on test(id) using hash"
));
assertTrue
(
isSupportedSyntax
(
stat
,
"create index idx_name_2 on test(id) using btree"
));
assertTrue
(
isSupportedSyntax
(
stat
,
"create unique index idx_name_3 on test(id) using hash"
));
conn
.
close
();
conn
.
close
();
deleteDb
(
"using_index"
);
deleteDb
(
"using_index"
);
}
}
...
@@ -110,39 +118,33 @@ public class TestUsingIndex extends TestBase {
...
@@ -110,39 +118,33 @@ public class TestUsingIndex extends TestBase {
if
(
config
.
memory
&&
config
.
mvcc
)
{
if
(
config
.
memory
&&
config
.
mvcc
)
{
return
;
return
;
}
}
if
(
DataType
.
GEOMETRY_CLASS
!=
null
)
{
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
deleteDb
(
"spatial"
);
return
;
conn
=
getConnection
(
"spatial"
);
try
{
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test"
+
"(id int primary key, poly geometry)"
);
stat
.
execute
(
"insert into test values(1, "
+
"'POLYGON ((1 1, 1 2, 2 2, 1 1))')"
);
stat
.
execute
(
"insert into test values(2,null)"
);
stat
.
execute
(
"insert into test values(3, "
+
"'POLYGON ((3 1, 3 2, 4 2, 3 1))')"
);
stat
.
execute
(
"insert into test values(4,null)"
);
stat
.
execute
(
"insert into test values(5, "
+
"'POLYGON ((1 3, 1 4, 2 4, 1 3))')"
);
stat
.
execute
(
"create index on test(poly) using rtree"
);
ResultSet
rs
=
stat
.
executeQuery
(
"select * from test "
+
"where poly && 'POINT (1.5 1.5)'::Geometry"
);
assertTrue
(
rs
.
next
());
assertEquals
(
1
,
rs
.
getInt
(
"id"
));
assertFalse
(
rs
.
next
());
rs
.
close
();
}
finally
{
// Close the database
conn
.
close
();
}
deleteDb
(
"spatial"
);
}
}
deleteDb
(
"spatial"
);
conn
=
getConnection
(
"spatial"
);
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test"
+
"(id int primary key, poly geometry)"
);
stat
.
execute
(
"insert into test values(1, "
+
"'POLYGON ((1 1, 1 2, 2 2, 1 1))')"
);
stat
.
execute
(
"insert into test values(2,null)"
);
stat
.
execute
(
"insert into test values(3, "
+
"'POLYGON ((3 1, 3 2, 4 2, 3 1))')"
);
stat
.
execute
(
"insert into test values(4,null)"
);
stat
.
execute
(
"insert into test values(5, "
+
"'POLYGON ((1 3, 1 4, 2 4, 1 3))')"
);
stat
.
execute
(
"create index on test(poly) using rtree"
);
ResultSet
rs
=
stat
.
executeQuery
(
"select * from test "
+
"where poly && 'POINT (1.5 1.5)'::Geometry"
);
assertTrue
(
rs
.
next
());
assertEquals
(
1
,
rs
.
getInt
(
"id"
));
assertFalse
(
rs
.
next
());
rs
.
close
();
conn
.
close
();
deleteDb
(
"spatial"
);
}
}
private
void
testBadSpatialSyntax
()
throws
SQLException
{
private
void
testBadSpatialSyntax
()
throws
SQLException
{
...
@@ -152,25 +154,20 @@ public class TestUsingIndex extends TestBase {
...
@@ -152,25 +154,20 @@ public class TestUsingIndex extends TestBase {
if
(
config
.
memory
&&
config
.
mvcc
)
{
if
(
config
.
memory
&&
config
.
mvcc
)
{
return
;
return
;
}
}
if
(
DataType
.
GEOMETRY_CLASS
!=
null
)
{
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
deleteDb
(
"spatial"
);
return
;
conn
=
getConnection
(
"spatial"
);
try
{
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test"
+
"(id int primary key, poly geometry)"
);
stat
.
execute
(
"insert into test values(1, "
+
"'POLYGON ((1 1, 1 2, 2 2, 1 1))')"
);
assertFalse
(
isSupportedSyntax
(
stat
,
"create spatial index on test(poly) using rtree"
));
}
finally
{
// Close the database
conn
.
close
();
}
deleteDb
(
"spatial"
);
}
}
deleteDb
(
"spatial"
);
conn
=
getConnection
(
"spatial"
);
stat
=
conn
.
createStatement
();
stat
.
execute
(
"create table test"
+
"(id int primary key, poly geometry)"
);
stat
.
execute
(
"insert into test values(1, "
+
"'POLYGON ((1 1, 1 2, 2 2, 1 1))')"
);
assertFalse
(
isSupportedSyntax
(
stat
,
"create spatial index on test(poly) using rtree"
));
conn
.
close
();
deleteDb
(
"spatial"
);
}
}
}
}
\ No newline at end of file
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
677a9793
...
@@ -771,4 +771,5 @@ young sweep clearer accounting disappeared donor oome ken jorissen nesterov
...
@@ -771,4 +771,5 @@ young sweep clearer accounting disappeared donor oome ken jorissen nesterov
degradation failures fashion disjunctive mentioned conjunctive misses broke
degradation failures fashion disjunctive mentioned conjunctive misses broke
authenticate orphaned registrations topology planner
authenticate orphaned registrations topology planner
zepfred frederico thimel arnaud manipulating strongly lots aquiles younger needing
zepfred frederico thimel arnaud manipulating strongly lots aquiles younger needing
unrecognized five omitting registering demo bson golomb
unrecognized five omitting registering demo bson golomb bocher erwan
\ No newline at end of file
huff frequencies freq frequency divisors asymmetric ideal nth prob ans
\ No newline at end of file
h2/src/tools/org/h2/dev/util/ImmutableArray.java
浏览文件 @
677a9793
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
*/
*/
package
org
.
h2
.
dev
.
util
;
package
org
.
h2
.
dev
.
util
;
import
java.util.Arrays
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
org.h2.mvstore.DataUtils
;
import
org.h2.mvstore.DataUtils
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论