Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
a8983746
提交
a8983746
authored
9月 11, 2013
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improve method and field naming "useCompression" -> "isCompressed"
上级
77d964d6
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
ValueDataType.java
h2/src/main/org/h2/mvstore/db/ValueDataType.java
+1
-1
Data.java
h2/src/main/org/h2/store/Data.java
+1
-1
Recover.java
h2/src/main/org/h2/tools/Recover.java
+1
-1
ValueLob.java
h2/src/main/org/h2/value/ValueLob.java
+8
-8
没有找到文件。
h2/src/main/org/h2/mvstore/db/ValueDataType.java
浏览文件 @
a8983746
...
@@ -375,7 +375,7 @@ public class ValueDataType implements DataType {
...
@@ -375,7 +375,7 @@ public class ValueDataType implements DataType {
writeVarInt
(
buff
,
lob
.
getTableId
());
writeVarInt
(
buff
,
lob
.
getTableId
());
writeVarInt
(
buff
,
lob
.
getObjectId
());
writeVarInt
(
buff
,
lob
.
getObjectId
());
writeVarLong
(
buff
,
lob
.
getPrecision
());
writeVarLong
(
buff
,
lob
.
getPrecision
());
buff
.
put
((
byte
)
(
lob
.
useCompression
()
?
1
:
0
));
buff
.
put
((
byte
)
(
lob
.
isCompressed
()
?
1
:
0
));
if
(
t
==
-
2
)
{
if
(
t
==
-
2
)
{
buff
=
writeString
(
buff
,
lob
.
getFileName
());
buff
=
writeString
(
buff
,
lob
.
getFileName
());
}
}
...
...
h2/src/main/org/h2/store/Data.java
浏览文件 @
a8983746
...
@@ -616,7 +616,7 @@ public class Data {
...
@@ -616,7 +616,7 @@ public class Data {
writeVarInt
(
lob
.
getTableId
());
writeVarInt
(
lob
.
getTableId
());
writeVarInt
(
lob
.
getObjectId
());
writeVarInt
(
lob
.
getObjectId
());
writeVarLong
(
lob
.
getPrecision
());
writeVarLong
(
lob
.
getPrecision
());
writeByte
((
byte
)
(
lob
.
useCompression
()
?
1
:
0
));
writeByte
((
byte
)
(
lob
.
isCompressed
()
?
1
:
0
));
if
(
t
==
-
2
)
{
if
(
t
==
-
2
)
{
writeString
(
lob
.
getFileName
());
writeString
(
lob
.
getFileName
());
}
}
...
...
h2/src/main/org/h2/tools/Recover.java
浏览文件 @
a8983746
...
@@ -339,7 +339,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -339,7 +339,7 @@ public class Recover extends Tool implements DataHandler {
if
(
small
==
null
)
{
if
(
small
==
null
)
{
String
file
=
lob
.
getFileName
();
String
file
=
lob
.
getFileName
();
String
type
=
lob
.
getType
()
==
Value
.
BLOB
?
"BLOB"
:
"CLOB"
;
String
type
=
lob
.
getType
()
==
Value
.
BLOB
?
"BLOB"
:
"CLOB"
;
if
(
lob
.
useCompression
())
{
if
(
lob
.
isCompressed
())
{
dumpLob
(
file
,
true
);
dumpLob
(
file
,
true
);
file
+=
".comp"
;
file
+=
".comp"
;
}
}
...
...
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
a8983746
...
@@ -62,11 +62,11 @@ public class ValueLob extends Value {
...
@@ -62,11 +62,11 @@ public class ValueLob extends Value {
private
boolean
linked
;
private
boolean
linked
;
private
byte
[]
small
;
private
byte
[]
small
;
private
int
hash
;
private
int
hash
;
private
boolean
compress
ion
;
private
boolean
compress
ed
;
private
FileStore
tempFile
;
private
FileStore
tempFile
;
private
ValueLob
(
int
type
,
DataHandler
handler
,
String
fileName
,
int
tableId
,
int
objectId
,
boolean
linked
,
private
ValueLob
(
int
type
,
DataHandler
handler
,
String
fileName
,
int
tableId
,
int
objectId
,
boolean
linked
,
long
precision
,
boolean
compress
ion
)
{
long
precision
,
boolean
compress
ed
)
{
this
.
type
=
type
;
this
.
type
=
type
;
this
.
handler
=
handler
;
this
.
handler
=
handler
;
this
.
fileName
=
fileName
;
this
.
fileName
=
fileName
;
...
@@ -74,7 +74,7 @@ public class ValueLob extends Value {
...
@@ -74,7 +74,7 @@ public class ValueLob extends Value {
this
.
objectId
=
objectId
;
this
.
objectId
=
objectId
;
this
.
linked
=
linked
;
this
.
linked
=
linked
;
this
.
precision
=
precision
;
this
.
precision
=
precision
;
this
.
compress
ion
=
compression
;
this
.
compress
ed
=
compressed
;
}
}
private
ValueLob
(
int
type
,
byte
[]
small
)
{
private
ValueLob
(
int
type
,
byte
[]
small
)
{
...
@@ -91,7 +91,7 @@ public class ValueLob extends Value {
...
@@ -91,7 +91,7 @@ public class ValueLob extends Value {
private
static
ValueLob
copy
(
ValueLob
lob
)
{
private
static
ValueLob
copy
(
ValueLob
lob
)
{
ValueLob
copy
=
new
ValueLob
(
lob
.
type
,
lob
.
handler
,
lob
.
fileName
,
ValueLob
copy
=
new
ValueLob
(
lob
.
type
,
lob
.
handler
,
lob
.
fileName
,
lob
.
tableId
,
lob
.
objectId
,
lob
.
linked
,
lob
.
precision
,
lob
.
compress
ion
);
lob
.
tableId
,
lob
.
objectId
,
lob
.
linked
,
lob
.
precision
,
lob
.
compress
ed
);
copy
.
small
=
lob
.
small
;
copy
.
small
=
lob
.
small
;
copy
.
hash
=
lob
.
hash
;
copy
.
hash
=
lob
.
hash
;
return
copy
;
return
copy
;
...
@@ -396,7 +396,7 @@ public class ValueLob extends Value {
...
@@ -396,7 +396,7 @@ public class ValueLob extends Value {
this
.
small
=
null
;
this
.
small
=
null
;
this
.
hash
=
0
;
this
.
hash
=
0
;
String
compressionAlgorithm
=
h
.
getLobCompressionAlgorithm
(
type
);
String
compressionAlgorithm
=
h
.
getLobCompressionAlgorithm
(
type
);
this
.
compress
ion
=
compressionAlgorithm
!=
null
;
this
.
compress
ed
=
compressionAlgorithm
!=
null
;
synchronized
(
h
)
{
synchronized
(
h
)
{
String
path
=
h
.
getDatabasePath
();
String
path
=
h
.
getDatabasePath
();
if
((
path
!=
null
)
&&
(
path
.
length
()
==
0
))
{
if
((
path
!=
null
)
&&
(
path
.
length
()
==
0
))
{
...
@@ -651,7 +651,7 @@ public class ValueLob extends Value {
...
@@ -651,7 +651,7 @@ public class ValueLob extends Value {
}
}
FileStore
store
=
handler
.
openFile
(
fileName
,
"r"
,
true
);
FileStore
store
=
handler
.
openFile
(
fileName
,
"r"
,
true
);
boolean
alwaysClose
=
SysProperties
.
lobCloseBetweenReads
;
boolean
alwaysClose
=
SysProperties
.
lobCloseBetweenReads
;
return
new
BufferedInputStream
(
new
FileStoreInputStream
(
store
,
handler
,
compress
ion
,
alwaysClose
),
return
new
BufferedInputStream
(
new
FileStoreInputStream
(
store
,
handler
,
compress
ed
,
alwaysClose
),
Constants
.
IO_BUFFER_SIZE
);
Constants
.
IO_BUFFER_SIZE
);
}
}
...
@@ -747,8 +747,8 @@ public class ValueLob extends Value {
...
@@ -747,8 +747,8 @@ public class ValueLob extends Value {
*
*
* @return true if it is
* @return true if it is
*/
*/
public
boolean
useCompression
()
{
public
boolean
isCompressed
()
{
return
compress
ion
;
return
compress
ed
;
}
}
private
static
synchronized
void
deleteFile
(
DataHandler
handler
,
String
fileName
)
{
private
static
synchronized
void
deleteFile
(
DataHandler
handler
,
String
fileName
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论