Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
80976a77
提交
80976a77
authored
7月 18, 2012
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small changes.
上级
dc1ae239
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
24 行增加
和
23 行删除
+24
-23
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+1
-1
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+1
-1
TableFilter.java
h2/src/main/org/h2/table/TableFilter.java
+1
-1
Csv.java
h2/src/main/org/h2/tools/Csv.java
+1
-1
DataType.java
h2/src/main/org/h2/value/DataType.java
+2
-2
ValueJavaObject.java
h2/src/main/org/h2/value/ValueJavaObject.java
+2
-2
ComplexObject.java
h2/src/test/org/h2/test/jaqu/ComplexObject.java
+3
-4
Order.java
h2/src/test/org/h2/test/jaqu/Order.java
+2
-3
Product.java
h2/src/test/org/h2/test/jaqu/Product.java
+4
-3
TestJavaObject.java
h2/src/test/org/h2/test/jdbc/TestJavaObject.java
+2
-2
TestDropTableLarge.java
h2/src/test/org/h2/test/todo/TestDropTableLarge.java
+3
-2
FileContentHash.java
h2/src/tools/org/h2/dev/util/FileContentHash.java
+1
-1
Expr.java
h2/src/tools/org/h2/java/Expr.java
+1
-0
没有找到文件。
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
80976a77
...
...
@@ -395,7 +395,7 @@ public class SysProperties {
* defensive copy himself before storing, or ensure that the value object is
* immutable.
*/
public
static
boolean
SERIALIZE_JAVA_OBJECT
=
Utils
.
getProperty
(
"h2.serializeJavaObject"
,
true
);
public
static
boolean
serializeJavaObject
=
Utils
.
getProperty
(
"h2.serializeJavaObject"
,
true
);
private
static
final
String
H2_BASE_DIR
=
"h2.baseDir"
;
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
80976a77
...
...
@@ -1754,7 +1754,7 @@ public class JdbcConnection extends TraceObject implements Connection {
break
;
}
case
Value
.
JAVA_OBJECT
:
if
(
SysProperties
.
SERIALIZE_JAVA_OBJECT
)
{
if
(
SysProperties
.
serializeJavaObject
)
{
o
=
Utils
.
deserialize
(
v
.
getBytesNoCopy
());
break
;
}
...
...
h2/src/main/org/h2/table/TableFilter.java
浏览文件 @
80976a77
...
...
@@ -995,7 +995,7 @@ public class TableFilter implements ColumnResolver {
/**
* A visitor for table filters.
*/
public
static
interface
TableFilterVisitor
{
public
interface
TableFilterVisitor
{
/**
* This method is called for each nested or joined table filter.
...
...
h2/src/main/org/h2/tools/Csv.java
浏览文件 @
80976a77
...
...
@@ -54,7 +54,7 @@ public class Csv implements SimpleRowSource {
private
boolean
caseSensitiveColumnNames
;
private
boolean
preserveWhitespace
;
private
boolean
writeColumnHeader
=
true
;
private
char
lineComment
=
0
;
private
char
lineComment
;
private
String
lineSeparator
=
SysProperties
.
LINE_SEPARATOR
;
private
String
nullString
=
""
;
...
...
h2/src/main/org/h2/value/DataType.java
浏览文件 @
80976a77
...
...
@@ -578,7 +578,7 @@ public class DataType {
break
;
}
case
Value
.
JAVA_OBJECT
:
{
if
(
SysProperties
.
SERIALIZE_JAVA_OBJECT
)
{
if
(
SysProperties
.
serializeJavaObject
)
{
byte
[]
buff
=
rs
.
getBytes
(
columnIndex
);
v
=
buff
==
null
?
ValueNull
.
INSTANCE
:
ValueJavaObject
.
getNoCopy
(
null
,
buff
);
}
else
{
...
...
@@ -1065,7 +1065,7 @@ public class DataType {
return
new
JdbcClob
(
conn
,
v
,
0
);
}
if
(
v
.
getType
()
==
Value
.
JAVA_OBJECT
)
{
Object
o
=
SysProperties
.
SERIALIZE_JAVA_OBJECT
?
Utils
.
deserialize
(
v
.
getBytes
())
:
v
.
getObject
();
Object
o
=
SysProperties
.
serializeJavaObject
?
Utils
.
deserialize
(
v
.
getBytes
())
:
v
.
getObject
();
if
(
paramClass
.
isAssignableFrom
(
o
.
getClass
()))
{
return
o
;
}
...
...
h2/src/main/org/h2/value/ValueJavaObject.java
浏览文件 @
80976a77
...
...
@@ -37,7 +37,7 @@ public class ValueJavaObject extends ValueBytes {
return
EMPTY
;
}
ValueJavaObject
obj
;
if
(
SysProperties
.
SERIALIZE_JAVA_OBJECT
)
{
if
(
SysProperties
.
serializeJavaObject
)
{
if
(
b
==
null
)
{
b
=
Utils
.
serialize
(
javaObject
);
}
...
...
@@ -62,7 +62,7 @@ public class ValueJavaObject extends ValueBytes {
/**
* Value which serializes java object only for I/O operations.
* Used when property {@link SysProperties#
SERIALIZE_JAVA_OBJECT
} is disabled.
* Used when property {@link SysProperties#
serializeJavaObject
} is disabled.
*
* @author Sergi Vladykin
*/
...
...
h2/src/test/org/h2/test/jaqu/ComplexObject.java
浏览文件 @
80976a77
...
...
@@ -6,14 +6,13 @@
*/
package
org
.
h2
.
test
.
jaqu
;
import
static
org
.
h2
.
jaqu
.
Define
.*;
import
static
org
.
h2
.
jaqu
.
Define
.
primaryKey
;
import
java.math.BigDecimal
;
import
java.sql.Time
;
import
java.sql.Timestamp
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.sql.Time
;
import
java.sql.Timestamp
;
import
org.h2.jaqu.Table
;
/**
...
...
h2/src/test/org/h2/test/jaqu/Order.java
浏览文件 @
80976a77
...
...
@@ -6,13 +6,12 @@
*/
package
org
.
h2
.
test
.
jaqu
;
import
static
org
.
h2
.
jaqu
.
Define
.
*
;
import
static
org
.
h2
.
jaqu
.
Define
.
primaryKey
;
import
static
org
.
h2
.
jaqu
.
Define
.
tableName
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
org.h2.jaqu.Table
;
/**
...
...
h2/src/test/org/h2/test/jaqu/Product.java
浏览文件 @
80976a77
...
...
@@ -6,13 +6,14 @@
*/
package
org
.
h2
.
test
.
jaqu
;
import
static
org
.
h2
.
jaqu
.
Define
.
index
;
import
static
org
.
h2
.
jaqu
.
Define
.
maxLength
;
import
static
org
.
h2
.
jaqu
.
Define
.
primaryKey
;
import
static
org
.
h2
.
jaqu
.
Define
.
tableName
;
import
java.util.Arrays
;
import
java.util.List
;
import
org.h2.jaqu.Table
;
import
static
org
.
h2
.
jaqu
.
Define
.*;
/**
* A table containing product data.
*/
...
...
h2/src/test/org/h2/test/jdbc/TestJavaObject.java
浏览文件 @
80976a77
...
...
@@ -46,7 +46,7 @@ public class TestJavaObject extends TestBase {
@Override
public
void
test
()
throws
Exception
{
SysProperties
.
SERIALIZE_JAVA_OBJECT
=
false
;
SysProperties
.
serializeJavaObject
=
false
;
try
{
trace
(
"Test Java Object"
);
doTest
(
new
MyObj
(
1
),
new
MyObj
(
2
),
false
);
...
...
@@ -59,7 +59,7 @@ public class TestJavaObject extends TestBase {
doTest
(
new
Time
(
System
.
currentTimeMillis
()
+
1000
),
new
Date
(
System
.
currentTimeMillis
()),
false
);
doTest
(
new
Time
(
System
.
currentTimeMillis
()
+
1000
),
new
Timestamp
(
System
.
currentTimeMillis
()),
false
);
}
finally
{
SysProperties
.
SERIALIZE_JAVA_OBJECT
=
true
;
SysProperties
.
serializeJavaObject
=
true
;
}
}
...
...
h2/src/test/org/h2/test/todo/TestDropTableLarge.java
浏览文件 @
80976a77
...
...
@@ -42,11 +42,12 @@ public class TestDropTableLarge {
PreparedStatement
prep2
=
conn
.
prepareStatement
(
"insert into test2(name) values(space(255))"
);
for
(
int
i
=
0
;
i
<
50000
;
i
++)
{
if
(
i
%
7
!=
0
)
if
(
i
%
7
!=
0
)
{
prep1
.
execute
();
else
}
else
{
prep2
.
execute
();
}
}
Profiler
prof
=
new
Profiler
();
prof
.
startCollecting
();
stat
.
execute
(
"DROP TABLE test1"
);
...
...
h2/src/tools/org/h2/dev/util/FileContentHash.java
浏览文件 @
80976a77
...
...
@@ -49,7 +49,7 @@ public class FileContentHash {
System
.
out
.
println
(
"Usage: java "
+
getClass
().
getName
()
+
" <dir>"
);
return
;
}
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
Info
info
=
hash
(
args
[
i
]);
System
.
out
.
println
(
"size: "
+
info
.
size
);
}
...
...
h2/src/tools/org/h2/java/Expr.java
浏览文件 @
80976a77
...
...
@@ -518,6 +518,7 @@ class StringExpr extends ExprBase {
}
public
void
setType
(
Type
type
)
{
// ignore
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论