Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
18536f38
提交
18536f38
authored
2月 23, 2018
作者:
thomasmueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting, Javadocs
上级
03e45626
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
70 行增加
和
16 行删除
+70
-16
release.txt
h2/src/installer/release.txt
+1
-1
ResultWithGeneratedKeys.java
h2/src/main/org/h2/result/ResultWithGeneratedKeys.java
+1
-0
ToChar.java
h2/src/main/org/h2/util/ToChar.java
+38
-9
ToDateParser.java
h2/src/main/org/h2/util/ToDateParser.java
+2
-1
ToDateTokenizer.java
h2/src/main/org/h2/util/ToDateTokenizer.java
+1
-1
ValueGeometry.java
h2/src/main/org/h2/value/ValueGeometry.java
+8
-1
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+12
-2
TestOutOfMemory.java
h2/src/test/org/h2/test/db/TestOutOfMemory.java
+6
-0
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/installer/release.txt
浏览文件 @
18536f38
...
...
@@ -77,7 +77,7 @@ are no longer working (they can be removed, or fixed):
The following can be skipped currently; benchmarks should probably be removed:
* To update benchmark data: use latest versions of other dbs, change version(s) in performance.html
## Build the
r
elease
## Build the
R
elease
Change directory to src/installer
Run ./buildRelease.sh (non-Windows) or buildRelease.bat (Windows)
...
...
h2/src/main/org/h2/result/ResultWithGeneratedKeys.java
浏览文件 @
18536f38
...
...
@@ -39,6 +39,7 @@ public class ResultWithGeneratedKeys {
*
* @param updateCount
* update count
* @return the result.
*/
public
static
ResultWithGeneratedKeys
of
(
int
updateCount
)
{
return
new
ResultWithGeneratedKeys
(
updateCount
);
...
...
h2/src/main/org/h2/util/ToChar.java
浏览文件 @
18536f38
...
...
@@ -36,7 +36,30 @@ public class ToChar {
private
static
final
String
[]
ROMAN_NUMERALS
=
{
"M"
,
"CM"
,
"D"
,
"CD"
,
"C"
,
"XC"
,
"L"
,
"XL"
,
"X"
,
"IX"
,
"V"
,
"IV"
,
"I"
};
static
final
int
MONTHS
=
0
,
SHORT_MONTHS
=
1
,
WEEKDAYS
=
2
,
SHORT_WEEKDAYS
=
3
,
AM_PM
=
4
;
/**
* The month field.
*/
static
final
int
MONTHS
=
0
;
/**
* The month field (short form).
*/
static
final
int
SHORT_MONTHS
=
1
;
/**
* The weekday field.
*/
static
final
int
WEEKDAYS
=
2
;
/**
* The weekday field (short form).
*/
static
final
int
SHORT_WEEKDAYS
=
3
;
/**
* The AM / PM field.
*/
static
final
int
AM_PM
=
4
;
private
static
volatile
String
[][]
NAMES
;
...
...
@@ -454,7 +477,13 @@ public class ToChar {
return
hex
;
}
static
String
[]
getNames
(
int
names
)
{
/**
* Get the date (month / weekday / ...) names.
*
* @param names the field
* @return the names
*/
static
String
[]
getDateNames
(
int
names
)
{
String
[][]
result
=
NAMES
;
if
(
result
==
null
)
{
result
=
new
String
[
5
][];
...
...
@@ -688,8 +717,8 @@ public class ToChar {
// Long/short date/time format
}
else
if
(
containsAt
(
format
,
i
,
"DL"
)
!=
null
)
{
String
day
=
getNames
(
WEEKDAYS
)[
DateTimeUtils
.
getSundayDayOfWeek
(
dateValue
)];
String
month
=
getNames
(
MONTHS
)[
monthOfYear
-
1
];
String
day
=
get
Date
Names
(
WEEKDAYS
)[
DateTimeUtils
.
getSundayDayOfWeek
(
dateValue
)];
String
month
=
get
Date
Names
(
MONTHS
)[
monthOfYear
-
1
];
output
.
append
(
day
).
append
(
", "
).
append
(
month
).
append
(
' '
).
append
(
dayOfMonth
).
append
(
", "
);
StringUtils
.
appendZeroPadded
(
output
,
4
,
posYear
);
i
+=
2
;
...
...
@@ -706,7 +735,7 @@ public class ToChar {
output
.
append
(
':'
);
StringUtils
.
appendZeroPadded
(
output
,
2
,
second
);
output
.
append
(
' '
);
output
.
append
(
getNames
(
AM_PM
)[
isAM
?
0
:
1
]);
output
.
append
(
get
Date
Names
(
AM_PM
)[
isAM
?
0
:
1
]);
i
+=
2
;
// Day
...
...
@@ -718,11 +747,11 @@ public class ToChar {
StringUtils
.
appendZeroPadded
(
output
,
2
,
dayOfMonth
);
i
+=
2
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"DY"
))
!=
null
)
{
String
day
=
getNames
(
SHORT_WEEKDAYS
)[
DateTimeUtils
.
getSundayDayOfWeek
(
dateValue
)];
String
day
=
get
Date
Names
(
SHORT_WEEKDAYS
)[
DateTimeUtils
.
getSundayDayOfWeek
(
dateValue
)];
output
.
append
(
cap
.
apply
(
day
));
i
+=
2
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"DAY"
))
!=
null
)
{
String
day
=
getNames
(
WEEKDAYS
)[
DateTimeUtils
.
getSundayDayOfWeek
(
dateValue
)];
String
day
=
get
Date
Names
(
WEEKDAYS
)[
DateTimeUtils
.
getSundayDayOfWeek
(
dateValue
)];
if
(
fillMode
)
{
day
=
StringUtils
.
pad
(
day
,
"Wednesday"
.
length
(),
" "
,
true
);
}
...
...
@@ -834,14 +863,14 @@ public class ToChar {
// Month / quarter
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"MONTH"
))
!=
null
)
{
String
month
=
getNames
(
MONTHS
)[
monthOfYear
-
1
];
String
month
=
get
Date
Names
(
MONTHS
)[
monthOfYear
-
1
];
if
(
fillMode
)
{
month
=
StringUtils
.
pad
(
month
,
"September"
.
length
(),
" "
,
true
);
}
output
.
append
(
cap
.
apply
(
month
));
i
+=
5
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"MON"
))
!=
null
)
{
String
month
=
getNames
(
SHORT_MONTHS
)[
monthOfYear
-
1
];
String
month
=
get
Date
Names
(
SHORT_MONTHS
)[
monthOfYear
-
1
];
output
.
append
(
cap
.
apply
(
month
));
i
+=
3
;
}
else
if
(
containsAt
(
format
,
i
,
"MM"
)
!=
null
)
{
...
...
h2/src/main/org/h2/util/ToDateParser.java
浏览文件 @
18536f38
...
...
@@ -41,7 +41,8 @@ public class ToDateParser {
private
int
hour
,
minute
,
second
,
nanos
;
private
int
hour12
;
boolean
isAM
=
true
;
private
boolean
isAM
=
true
;
private
TimeZone
timeZone
;
...
...
h2/src/main/org/h2/util/ToDateTokenizer.java
浏览文件 @
18536f38
...
...
@@ -501,7 +501,7 @@ class ToDateTokenizer {
static
String
setByName
(
ToDateParser
params
,
int
field
)
{
String
inputFragmentStr
=
null
;
String
s
=
params
.
getInputStr
();
String
[]
values
=
ToChar
.
getNames
(
field
);
String
[]
values
=
ToChar
.
get
Date
Names
(
field
);
for
(
int
i
=
0
;
i
<
values
.
length
;
i
++)
{
String
dayName
=
values
[
i
];
if
(
dayName
==
null
)
{
...
...
h2/src/main/org/h2/value/ValueGeometry.java
浏览文件 @
18536f38
...
...
@@ -283,12 +283,19 @@ public class ValueGeometry extends Value {
* A visitor that checks if there is a Z coordinate.
*/
static
class
ZVisitor
implements
CoordinateSequenceFilter
{
boolean
foundZ
;
private
boolean
foundZ
;
public
boolean
isFoundZ
()
{
return
foundZ
;
}
/**
* Performs an operation on a coordinate in a CoordinateSequence.
*
* @param coordinateSequence the object to which the filter is applied
* @param i the index of the coordinate to apply the filter to
*/
@Override
public
void
filter
(
CoordinateSequence
coordinateSequence
,
int
i
)
{
if
(!
Double
.
isNaN
(
coordinateSequence
.
getOrdinate
(
i
,
2
)))
{
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
18536f38
...
...
@@ -1695,12 +1695,22 @@ public abstract class TestBase {
}
/**
* Get the name of the test.
*
* @return the name of the test class
*/
public
String
getTestName
()
{
return
getClass
().
getSimpleName
();
}
/**
* Build a child process.
*
* @param name the name
* @param childClass the class
* @param jvmArgs the argument list
* @return the process builder
*/
public
ProcessBuilder
buildChild
(
String
name
,
Class
<?
extends
TestBase
>
childClass
,
String
...
jvmArgs
)
{
List
<
String
>
args
=
new
ArrayList
<>(
16
);
...
...
@@ -1720,8 +1730,7 @@ public abstract class TestBase {
return
processBuilder
;
}
public
abstract
static
class
Child
extends
TestBase
{
public
abstract
static
class
Child
extends
TestBase
{
private
String
url
;
private
String
user
;
private
String
password
;
...
...
@@ -1742,5 +1751,6 @@ public abstract class TestBase {
public
Connection
getConnection
()
throws
SQLException
{
return
getConnection
(
url
,
user
,
password
);
}
}
}
h2/src/test/org/h2/test/db/TestOutOfMemory.java
浏览文件 @
18536f38
...
...
@@ -205,6 +205,12 @@ public class TestOutOfMemory extends TestBase {
public
static
final
class
MyChild
extends
TestBase
.
Child
{
/**
* Run just this test.
*
* @param args the arguments
*/
public
static
void
main
(
String
...
args
)
throws
Exception
{
new
MyChild
(
args
).
init
().
test
();
}
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
18536f38
...
...
@@ -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 dfs weekdays intermittent looked msec tstz africa monrovia asia tokyo
london dfs weekdays intermittent looked msec tstz africa monrovia asia tokyo
weekday
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论