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 {
writeVarInt
(
buff
,
lob
.
getTableId
());
writeVarInt
(
buff
,
lob
.
getObjectId
());
writeVarLong
(
buff
,
lob
.
getPrecision
());
buff
.
put
((
byte
)
(
lob
.
useCompression
()
?
1
:
0
));
buff
.
put
((
byte
)
(
lob
.
isCompressed
()
?
1
:
0
));
if
(
t
==
-
2
)
{
buff
=
writeString
(
buff
,
lob
.
getFileName
());
}
...
...
h2/src/main/org/h2/store/Data.java
浏览文件 @
a8983746
...
...
@@ -616,7 +616,7 @@ public class Data {
writeVarInt
(
lob
.
getTableId
());
writeVarInt
(
lob
.
getObjectId
());
writeVarLong
(
lob
.
getPrecision
());
writeByte
((
byte
)
(
lob
.
useCompression
()
?
1
:
0
));
writeByte
((
byte
)
(
lob
.
isCompressed
()
?
1
:
0
));
if
(
t
==
-
2
)
{
writeString
(
lob
.
getFileName
());
}
...
...
h2/src/main/org/h2/tools/Recover.java
浏览文件 @
a8983746
...
...
@@ -339,7 +339,7 @@ public class Recover extends Tool implements DataHandler {
if
(
small
==
null
)
{
String
file
=
lob
.
getFileName
();
String
type
=
lob
.
getType
()
==
Value
.
BLOB
?
"BLOB"
:
"CLOB"
;
if
(
lob
.
useCompression
())
{
if
(
lob
.
isCompressed
())
{
dumpLob
(
file
,
true
);
file
+=
".comp"
;
}
...
...
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
a8983746
...
...
@@ -62,11 +62,11 @@ public class ValueLob extends Value {
private
boolean
linked
;
private
byte
[]
small
;
private
int
hash
;
private
boolean
compress
ion
;
private
boolean
compress
ed
;
private
FileStore
tempFile
;
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
.
handler
=
handler
;
this
.
fileName
=
fileName
;
...
...
@@ -74,7 +74,7 @@ public class ValueLob extends Value {
this
.
objectId
=
objectId
;
this
.
linked
=
linked
;
this
.
precision
=
precision
;
this
.
compress
ion
=
compression
;
this
.
compress
ed
=
compressed
;
}
private
ValueLob
(
int
type
,
byte
[]
small
)
{
...
...
@@ -91,7 +91,7 @@ public class ValueLob extends Value {
private
static
ValueLob
copy
(
ValueLob
lob
)
{
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
.
hash
=
lob
.
hash
;
return
copy
;
...
...
@@ -396,7 +396,7 @@ public class ValueLob extends Value {
this
.
small
=
null
;
this
.
hash
=
0
;
String
compressionAlgorithm
=
h
.
getLobCompressionAlgorithm
(
type
);
this
.
compress
ion
=
compressionAlgorithm
!=
null
;
this
.
compress
ed
=
compressionAlgorithm
!=
null
;
synchronized
(
h
)
{
String
path
=
h
.
getDatabasePath
();
if
((
path
!=
null
)
&&
(
path
.
length
()
==
0
))
{
...
...
@@ -651,7 +651,7 @@ public class ValueLob extends Value {
}
FileStore
store
=
handler
.
openFile
(
fileName
,
"r"
,
true
);
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
);
}
...
...
@@ -747,8 +747,8 @@ public class ValueLob extends Value {
*
* @return true if it is
*/
public
boolean
useCompression
()
{
return
compress
ion
;
public
boolean
isCompressed
()
{
return
compress
ed
;
}
private
static
synchronized
void
deleteFile
(
DataHandler
handler
,
String
fileName
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论