Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
d5714322
Unverified
提交
d5714322
authored
2月 20, 2018
作者:
Noel Grandin
提交者:
GitHub
2月 20, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #886 from katzyn/misc
Fix building of documentation
上级
6bde4590
55cffae0
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
60 行增加
和
36 行删除
+60
-36
GeneratedKeys.java
h2/src/main/org/h2/engine/GeneratedKeys.java
+2
-0
ToDateParser.java
h2/src/main/org/h2/util/ToDateParser.java
+1
-1
ToDateTokenizer.java
h2/src/main/org/h2/util/ToDateTokenizer.java
+2
-2
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+4
-4
TestGetGeneratedKeys.java
h2/src/test/org/h2/test/jdbc/TestGetGeneratedKeys.java
+50
-28
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/main/org/h2/engine/GeneratedKeys.java
浏览文件 @
d5714322
...
...
@@ -120,6 +120,8 @@ public final class GeneratedKeys {
/**
* Returns generated keys.
*
* @param session
* session
* @return local result with generated keys
*/
public
LocalResult
getKeys
(
Session
session
)
{
...
...
h2/src/main/org/h2/util/ToDateParser.java
浏览文件 @
d5714322
...
...
@@ -215,7 +215,7 @@ public class ToDateParser {
this
.
minute
=
minute
;
}
void
setSeco
r
d
(
int
second
)
{
void
setSeco
n
d
(
int
second
)
{
this
.
second
=
second
;
}
...
...
h2/src/main/org/h2/util/ToDateTokenizer.java
浏览文件 @
d5714322
...
...
@@ -389,7 +389,7 @@ class ToDateTokenizer {
inputFragmentStr
=
matchStringOrThrow
(
PATTERN_TWO_DIGITS_OR_LESS
,
params
,
formatTokenEnum
);
dateNr
=
Integer
.
parseInt
(
inputFragmentStr
);
params
.
setSeco
r
d
(
dateNr
);
params
.
setSeco
n
d
(
dateNr
);
break
;
case
SSSSS:
{
inputFragmentStr
=
matchStringOrThrow
(
PATTERN_NUMBER
,
params
,
...
...
@@ -402,7 +402,7 @@ class ToDateTokenizer {
int
hour
=
dateNr
%
24
;
params
.
setHour
(
hour
);
params
.
setMinute
(
minute
);
params
.
setSeco
r
d
(
second
);
params
.
setSeco
n
d
(
second
);
break
;
}
case
FF:
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
d5714322
...
...
@@ -1453,9 +1453,9 @@ public abstract class TestBase {
*
* @return the path to java
*/
private
String
getJVM
()
{
return
System
.
getProperty
(
"java.home"
)
+
File
.
separatorChar
+
"bin"
+
File
.
separator
+
"java"
;
private
static
String
getJVM
()
{
return
System
.
getProperty
(
"java.home"
)
+
File
.
separatorChar
+
"bin"
+
File
.
separator
+
"java"
;
}
/**
...
...
@@ -1702,7 +1702,7 @@ public abstract class TestBase {
}
public
ProcessBuilder
buildChild
(
String
name
,
Class
<?
extends
TestBase
>
childClass
,
String
...
jvmArgs
)
{
String
...
jvmArgs
)
{
List
<
String
>
args
=
new
ArrayList
<>(
16
);
args
.
add
(
getJVM
());
Collections
.
addAll
(
args
,
jvmArgs
);
...
...
h2/src/test/org/h2/test/jdbc/TestGetGeneratedKeys.java
浏览文件 @
d5714322
...
...
@@ -61,7 +61,7 @@ public class TestGetGeneratedKeys extends TestBase {
deleteDb
(
"getGeneratedKeys"
);
Connection
conn
=
getConnection
(
"getGeneratedKeys"
);
testBatchAndMergeInto
(
conn
);
testCalledSequen
s
es
(
conn
);
testCalledSequen
c
es
(
conn
);
testInsertWithSelect
(
conn
);
testMergeUsing
(
conn
);
testMultithreaded
(
conn
);
...
...
@@ -171,7 +171,7 @@ public class TestGetGeneratedKeys extends TestBase {
* @throws Exception
* on exception
*/
private
void
testCalledSequen
s
es
(
Connection
conn
)
throws
Exception
{
private
void
testCalledSequen
c
es
(
Connection
conn
)
throws
Exception
{
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE SEQUENCE SEQ"
);
...
...
@@ -418,7 +418,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String)}.{@link PreparedStatement#execute()}.
* {@link Connection#prepareStatement(String)}
* .{@link PreparedStatement#execute()}.
*
* @param conn
* connection
...
...
@@ -439,7 +440,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String)}.{@link PreparedStatement#executeBatch()}.
* {@link Connection#prepareStatement(String)}
* .{@link PreparedStatement#executeBatch()}.
*
* @param conn
* connection
...
...
@@ -462,7 +464,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String)}.{@link PreparedStatement#executeLargeBatch()}.
* {@link Connection#prepareStatement(String)}
* .{@link PreparedStatement#executeLargeBatch()}.
*
* @param conn
* connection
...
...
@@ -486,7 +489,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String)}.{@link PreparedStatement#executeLargeUpdate()}.
* {@link Connection#prepareStatement(String)}
* .{@link PreparedStatement#executeLargeUpdate()}.
*
* @param conn
* connection
...
...
@@ -508,7 +512,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String)}.{@link PreparedStatement#executeUpdate()}.
* {@link Connection#prepareStatement(String)}
* .{@link PreparedStatement#executeUpdate()}.
*
* @param conn
* connection
...
...
@@ -529,7 +534,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int)}.{@link PreparedStatement#execute()}.
* {@link Connection#prepareStatement(String, int)}
* .{@link PreparedStatement#execute()}.
*
* @param conn
* connection
...
...
@@ -562,7 +568,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int)}.{@link PreparedStatement#executeBatch()}.
* {@link Connection#prepareStatement(String, int)}
* .{@link PreparedStatement#executeBatch()}.
*
* @param conn
* connection
...
...
@@ -601,8 +608,8 @@ public class TestGetGeneratedKeys extends TestBase {
}
/**
* Test method for
*
{@link Connection#prepareStatement(String, int)}
.{@link PreparedStatement#executeLargeBatch()}.
* Test method for
{@link Connection#prepareStatement(String, int)}
* .{@link PreparedStatement#executeLargeBatch()}.
*
* @param conn
* connection
...
...
@@ -643,7 +650,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int)}.{@link PreparedStatement#executeLargeUpdate()}.
* {@link Connection#prepareStatement(String, int)}
* .{@link PreparedStatement#executeLargeUpdate()}.
*
* @param conn
* connection
...
...
@@ -677,7 +685,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int)}.{@link PreparedStatement#executeUpdate()}.
* {@link Connection#prepareStatement(String, int)}
* .{@link PreparedStatement#executeUpdate()}.
*
* @param conn
* connection
...
...
@@ -710,7 +719,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int[])}.{@link PreparedStatement#execute()}.
* {@link Connection#prepareStatement(String, int[])}
* .{@link PreparedStatement#execute()}.
*
* @param conn
* connection
...
...
@@ -762,7 +772,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int[])}.{@link PreparedStatement#executeBatch()}.
* {@link Connection#prepareStatement(String, int[])}
* .{@link PreparedStatement#executeBatch()}.
*
* @param conn
* connection
...
...
@@ -830,7 +841,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int[])}.{@link PreparedStatement#executeLargeBatch()}.
* {@link Connection#prepareStatement(String, int[])}
* .{@link PreparedStatement#executeLargeBatch()}.
*
* @param conn
* connection
...
...
@@ -849,7 +861,8 @@ public class TestGetGeneratedKeys extends TestBase {
ResultSet
rs
=
prep
.
getGeneratedKeys
();
assertFalse
(
rs
.
next
());
rs
.
close
();
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (20)"
,
new
int
[]
{
1
,
2
});
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (20)"
,
new
int
[]
{
1
,
2
});
prep
.
addBatch
();
prep
.
addBatch
();
prep
.
executeLargeBatch
();
...
...
@@ -865,7 +878,8 @@ public class TestGetGeneratedKeys extends TestBase {
assertEquals
(
UUID
.
class
,
rs
.
getObject
(
2
).
getClass
());
assertFalse
(
rs
.
next
());
rs
.
close
();
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (30)"
,
new
int
[]
{
2
,
1
});
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (30)"
,
new
int
[]
{
2
,
1
});
prep
.
addBatch
();
prep
.
addBatch
();
prep
.
executeLargeBatch
();
...
...
@@ -899,7 +913,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int[])}.{@link PreparedStatement#executeLargeUpdate()}.
* {@link Connection#prepareStatement(String, int[])}
* .{@link PreparedStatement#executeLargeUpdate()}.
*
* @param conn
* connection
...
...
@@ -916,7 +931,8 @@ public class TestGetGeneratedKeys extends TestBase {
ResultSet
rs
=
prep
.
getGeneratedKeys
();
assertFalse
(
rs
.
next
());
rs
.
close
();
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (20)"
,
new
int
[]
{
1
,
2
});
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (20)"
,
new
int
[]
{
1
,
2
});
prep
.
executeLargeUpdate
();
rs
=
prep
.
getGeneratedKeys
();
assertEquals
(
2
,
rs
.
getMetaData
().
getColumnCount
());
...
...
@@ -927,7 +943,8 @@ public class TestGetGeneratedKeys extends TestBase {
assertEquals
(
UUID
.
class
,
rs
.
getObject
(
2
).
getClass
());
assertFalse
(
rs
.
next
());
rs
.
close
();
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (30)"
,
new
int
[]
{
2
,
1
});
prep
=
(
JdbcPreparedStatement
)
conn
.
prepareStatement
(
"INSERT INTO TEST(VALUE) VALUES (30)"
,
new
int
[]
{
2
,
1
});
prep
.
executeLargeUpdate
();
rs
=
prep
.
getGeneratedKeys
();
assertEquals
(
2
,
rs
.
getMetaData
().
getColumnCount
());
...
...
@@ -952,7 +969,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, int[])}.{@link PreparedStatement#executeUpdate()}.
* {@link Connection#prepareStatement(String, int[])}
* .{@link PreparedStatement#executeUpdate()}.
*
* @param conn
* connection
...
...
@@ -1004,7 +1022,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, String[])}.{@link PreparedStatement#execute()}.
* {@link Connection#prepareStatement(String, String[])}
* .{@link PreparedStatement#execute()}.
*
* @param conn
* connection
...
...
@@ -1056,7 +1075,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, String[])}.{@link PreparedStatement#executeBatch()}.
* {@link Connection#prepareStatement(String, String[])}
* .{@link PreparedStatement#executeBatch()}.
*
* @param conn
* connection
...
...
@@ -1124,7 +1144,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, String[])}.{@link PreparedStatement#executeLargeBatch()}.
* {@link Connection#prepareStatement(String, String[])}
* .{@link PreparedStatement#executeLargeBatch()}.
*
* @param conn
* connection
...
...
@@ -1196,7 +1217,8 @@ public class TestGetGeneratedKeys extends TestBase {
/**
* Test method for
* {@link Connection#prepareStatement(String, String[])}.{@link PreparedStatement#executeLargeUpdate()}.
* {@link Connection#prepareStatement(String, String[])}
* .{@link PreparedStatement#executeLargeUpdate()}.
*
* @param conn
* connection
...
...
@@ -1251,8 +1273,8 @@ public class TestGetGeneratedKeys extends TestBase {
}
/**
* Test method for
*
{@link Connection#prepareStatement(String, String[])}
.{@link PreparedStatement#executeUpdate()}.
* Test method for
{@link Connection#prepareStatement(String, String[])}
* .{@link PreparedStatement#executeUpdate()}.
*
* @param conn
* connection
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
d5714322
...
...
@@ -765,4 +765,4 @@ jacoco xdata invokes sourcefiles classfiles duplication crypto stacktraces prt d
interpolated thead
die weekdiff osx subprocess dow proleptic microsecond microseconds divisible cmp denormalized suppressed saturated mcs
london
london
dfs weekdays intermittent looked
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论