Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c6f12e1c
Unverified
提交
c6f12e1c
authored
8月 16, 2018
作者:
Evgenij Ryazanov
提交者:
GitHub
8月 16, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1381 from katzyn/misc
Minor fixes for INTERVAL data type
上级
259d09c5
e0c8dfb0
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
9 行删除
+11
-9
help.csv
h2/src/docsrc/help/help.csv
+4
-4
Value.java
h2/src/main/org/h2/value/Value.java
+5
-1
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+2
-4
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
c6f12e1c
...
@@ -2244,7 +2244,7 @@ intType | booleanType | tinyintType | smallintType | bigintType | identityType
...
@@ -2244,7 +2244,7 @@ intType | booleanType | tinyintType | smallintType | bigintType | identityType
| decimalType | doubleType | realType | dateType | timeType | timestampType
| decimalType | doubleType | realType | dateType | timeType | timestampType
| timestampWithTimeZoneType | binaryType | otherType | varcharType
| timestampWithTimeZoneType | binaryType | otherType | varcharType
| varcharIgnorecaseType | charType | blobType | clobType | uuidType
| varcharIgnorecaseType | charType | blobType | clobType | uuidType
| arrayType | enumType
| arrayType | enumType
| intervalType
","
","
A data type definition.
A data type definition.
","
","
...
@@ -3048,7 +3048,7 @@ and ""ResultSet.getObject(..)"" or ""ResultSet.getString(..)"" to retrieve the v
...
@@ -3048,7 +3048,7 @@ and ""ResultSet.getObject(..)"" or ""ResultSet.getString(..)"" to retrieve the v
GEOMETRY
GEOMETRY
"
"
"Data Types","INTERVAL Type
s
","
"Data Types","INTERVAL Type","
intervalYearType | intervalMonthType | intervalDayType
intervalYearType | intervalMonthType | intervalDayType
| intervalHourType| intervalMinuteType | intervalSecondType
| intervalHourType| intervalMinuteType | intervalSecondType
| intervalYearToMonthType | intervalDayToHourType
| intervalYearToMonthType | intervalDayToHourType
...
@@ -3056,8 +3056,8 @@ intervalYearType | intervalMonthType | intervalDayType
...
@@ -3056,8 +3056,8 @@ intervalYearType | intervalMonthType | intervalDayType
| intervalHourToMinuteType | intervalHourToSecondType
| intervalHourToMinuteType | intervalHourToSecondType
| intervalMinuteToSecondType
| intervalMinuteToSecondType
","
","
Interval data type
s
.
Interval data type.
There are two classes of intervals. Year-month intervals can store years
or
months.
There are two classes of intervals. Year-month intervals can store years
and
months.
Day-time intervals can store days, hours, minutes, and seconds.
Day-time intervals can store days, hours, minutes, and seconds.
Year-month intervals are comparable only with another year-month intervals.
Year-month intervals are comparable only with another year-month intervals.
Day-time intervals are comparable only with another day-time intervals.
Day-time intervals are comparable only with another day-time intervals.
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
c6f12e1c
...
@@ -1285,7 +1285,11 @@ public abstract class Value {
...
@@ -1285,7 +1285,11 @@ public abstract class Value {
if
(
JdbcUtils
.
customDataTypesHandler
!=
null
)
{
if
(
JdbcUtils
.
customDataTypesHandler
!=
null
)
{
return
JdbcUtils
.
customDataTypesHandler
.
convert
(
this
,
targetType
);
return
JdbcUtils
.
customDataTypesHandler
.
convert
(
this
,
targetType
);
}
}
throw
DbException
.
throwInternalError
(
"type="
+
targetType
);
DataType
from
=
DataType
.
getDataType
(
getType
());
DataType
to
=
DataType
.
getDataType
(
targetType
);
throw
DbException
.
get
(
ErrorCode
.
DATA_CONVERSION_ERROR_1
,
(
from
!=
null
?
from
.
name
:
"type="
+
getType
())
+
" to "
+
(
to
!=
null
?
to
.
name
:
"type="
+
targetType
));
}
}
}
catch
(
NumberFormatException
e
)
{
}
catch
(
NumberFormatException
e
)
{
throw
DbException
.
get
(
throw
DbException
.
get
(
...
...
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
c6f12e1c
...
@@ -527,13 +527,11 @@ public class TestCrashAPI extends TestDb implements Runnable {
...
@@ -527,13 +527,11 @@ public class TestCrashAPI extends TestDb implements Runnable {
private
void
initMethods
()
{
private
void
initMethods
()
{
for
(
Class
<?>
inter
:
INTERFACES
)
{
for
(
Class
<?>
inter
:
INTERFACES
)
{
classMethods
.
put
(
inter
,
new
ArrayList
<
Method
>());
ArrayList
<
Method
>
list
=
new
ArrayList
<>();
}
for
(
Class
<?>
inter
:
INTERFACES
)
{
ArrayList
<
Method
>
list
=
classMethods
.
get
(
inter
);
for
(
Method
m
:
inter
.
getMethods
())
{
for
(
Method
m
:
inter
.
getMethods
())
{
list
.
add
(
m
);
list
.
add
(
m
);
}
}
classMethods
.
put
(
inter
,
list
);
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论