Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c7687784
提交
c7687784
authored
11 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The spatial index now works in MVCC mode when using the MVStore storage.
上级
6d915060
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
21 行增加
和
1 行删除
+21
-1
Recover.java
h2/src/main/org/h2/tools/Recover.java
+2
-1
TestMVRTree.java
h2/src/test/org/h2/test/store/TestMVRTree.java
+19
-0
没有找到文件。
h2/src/main/org/h2/tools/Recover.java
浏览文件 @
c7687784
...
@@ -505,7 +505,8 @@ public class Recover extends Tool implements DataHandler {
...
@@ -505,7 +505,8 @@ public class Recover extends Tool implements DataHandler {
null
,
this
,
null
);
null
,
this
,
null
);
ValueDataType
valueType
=
new
ValueDataType
(
ValueDataType
valueType
=
new
ValueDataType
(
null
,
this
,
null
);
null
,
this
,
null
);
TransactionMap
<
Value
,
Value
>
dataMap
=
store
.
begin
().
openMap
(
mapName
,
keyType
,
valueType
);
TransactionMap
<
Value
,
Value
>
dataMap
=
store
.
begin
().
openMap
(
mapName
,
keyType
,
valueType
);
Iterator
<
Value
>
dataIt
=
dataMap
.
keyIterator
(
null
);
Iterator
<
Value
>
dataIt
=
dataMap
.
keyIterator
(
null
);
boolean
init
=
false
;
boolean
init
=
false
;
while
(
dataIt
.
hasNext
())
{
while
(
dataIt
.
hasNext
())
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/store/TestMVRTree.java
浏览文件 @
c7687784
...
@@ -47,6 +47,7 @@ public class TestMVRTree extends TestMVStore {
...
@@ -47,6 +47,7 @@ public class TestMVRTree extends TestMVStore {
FileUtils
.
deleteRecursive
(
getBaseDir
(),
true
);
FileUtils
.
deleteRecursive
(
getBaseDir
(),
true
);
FileUtils
.
createDirectories
(
getBaseDir
());
FileUtils
.
createDirectories
(
getBaseDir
());
testSpatialKey
();
testExample
();
testExample
();
testMany
();
testMany
();
testSimple
();
testSimple
();
...
@@ -54,6 +55,24 @@ public class TestMVRTree extends TestMVStore {
...
@@ -54,6 +55,24 @@ public class TestMVRTree extends TestMVStore {
testRandomFind
();
testRandomFind
();
}
}
private
void
testSpatialKey
()
{
SpatialKey
a0
=
new
SpatialKey
(
0
,
1
,
2
,
3
,
4
);
SpatialKey
a1
=
new
SpatialKey
(
0
,
1
,
2
,
3
,
4
);
SpatialKey
b0
=
new
SpatialKey
(
1
,
1
,
2
,
3
,
4
);
SpatialKey
c0
=
new
SpatialKey
(
1
,
1.1f
,
2.2f
,
3.3f
,
4.4f
);
assertEquals
(
0
,
a0
.
hashCode
());
assertEquals
(
1
,
b0
.
hashCode
());
assertTrue
(
a0
.
equals
(
a0
));
assertTrue
(
a0
.
equals
(
a1
));
assertFalse
(
a0
.
equals
(
b0
));
assertTrue
(
a0
.
equalsIgnoringId
(
b0
));
assertFalse
(
b0
.
equals
(
c0
));
assertFalse
(
b0
.
equalsIgnoringId
(
c0
));
assertEquals
(
"0: (1.0/2.0, 3.0/4.0)"
,
a0
.
toString
());
assertEquals
(
"1: (1.0/2.0, 3.0/4.0)"
,
b0
.
toString
());
assertEquals
(
"1: (1.1/2.2, 3.3/4.4)"
,
c0
.
toString
());
}
private
void
testExample
()
{
private
void
testExample
()
{
// create an in-memory store
// create an in-memory store
MVStore
s
=
MVStore
.
open
(
null
);
MVStore
s
=
MVStore
.
open
(
null
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论