Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
7165c79b
提交
7165c79b
authored
10月 02, 2016
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
documentation and changelog
上级
d616c00d
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
52 行增加
和
2 行删除
+52
-2
help.csv
h2/src/docsrc/help/help.csv
+14
-0
changelog.html
h2/src/docsrc/html/changelog.html
+24
-0
roadmap.html
h2/src/docsrc/html/roadmap.html
+0
-1
help.csv
h2/src/main/org/h2/res/help.csv
+4
-0
ValueTimestampTimeZone.java
h2/src/main/org/h2/value/ValueTimestampTimeZone.java
+9
-0
ValueTimestampUtc.java
h2/src/main/org/h2/value/ValueTimestampUtc.java
+1
-1
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
7165c79b
...
@@ -2325,12 +2325,26 @@ DATE
...
@@ -2325,12 +2325,26 @@ DATE
{ TIMESTAMP | DATETIME | SMALLDATETIME }
{ TIMESTAMP | DATETIME | SMALLDATETIME }
","
","
The timestamp data type. The format is yyyy-MM-dd hh:mm:ss[.nnnnnnnnn].
The timestamp data type. The format is yyyy-MM-dd hh:mm:ss[.nnnnnnnnn].
Stored internally as a BCD-encoded date, and nano-seconds since midnight.
Mapped to ""java.sql.Timestamp"" (""java.util.Date"" is also supported).
Mapped to ""java.sql.Timestamp"" (""java.util.Date"" is also supported).
","
","
TIMESTAMP
TIMESTAMP
"
"
"Data Types","TIMESTAMP WITH TIMEZONE Type","
TIMESTAMP WITH TIMEZONE
","
VERY MUCH STILL IN TESTING.
The timestamp with timezone data type.
Stored internally as a BCD-encoded date, nano-seconds since midnight, and timezone offset in minutes.
Note that range queries on this datatype may do some weird stuff close to DST boundaries.
Mapped to ""org.h2.api.TimestampWithTimeZone""
","
TIMESTAMP WITH TIMEZONE
"
"Data Types","BINARY Type","
"Data Types","BINARY Type","
{ BINARY | VARBINARY | LONGVARBINARY | RAW | BYTEA } [ ( precisionInt ) ]
{ BINARY | VARBINARY | LONGVARBINARY | RAW | BYTEA } [ ( precisionInt ) ]
","
","
...
...
h2/src/docsrc/html/changelog.html
浏览文件 @
7165c79b
...
@@ -21,6 +21,30 @@ Change Log
...
@@ -21,6 +21,30 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul>
<ul>
<li>
WARNING: THE MERGE BELOW WILL AFFECT ANY 'TIMESTAMP WITH TIMEZONE' INDEXES. You will need to drop and recreate any such indexes.
</li>
<li>
PR #364: fix compare TIMESTAMP WITH TIMEZONE
</li>
<li>
PR #363: Added support to define last IDENTIFIER on a Trigger.
</li>
<li>
PR #366: Tests for timestamps
</li>
<li>
PR #361: Improve TimestampWithTimeZone javadoc
</li>
<li>
PR #360: Change getters in TimestampWithTimeZone to int
</li>
<li>
PR #359: Added missing source encoding. Assuming UTF-8.
</li>
<li>
PR #353: Add support for converting JAVA_OBJECT to UUID
</li>
<li>
PR #358: Add support for getObject(int|String, Class)
</li>
<li>
PR #357: Server: use xdg-open to open the WebConsole in the user's preferred browser on Linux
</li>
<li>
PR #356: Support for BEFORE and AFTER clauses when using multiple columns in ALTER TABLE ADD
</li>
<li>
PR #351: Respect format codes from Bind message when sending results
</li>
<li>
ignore summary line when compiling stored procedure
<li>
ignore summary line when compiling stored procedure
</li>
</li>
<li>
PR #348: pg: send RowDescription in response to Describe (statement variant), patch by kostya-sh
<li>
PR #348: pg: send RowDescription in response to Describe (statement variant), patch by kostya-sh
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
7165c79b
...
@@ -314,7 +314,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
...
@@ -314,7 +314,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Replace information_schema tables with regular tables that are automatically re-built when needed. Use indexes.
</li><li>
Replace information_schema tables with regular tables that are automatically re-built when needed. Use indexes.
</li><li>
Issue 50: Oracle compatibility: support calling 0-parameters functions without parenthesis. Make constants obsolete.
</li><li>
Issue 50: Oracle compatibility: support calling 0-parameters functions without parenthesis. Make constants obsolete.
</li><li>
MySQL, HSQLDB compatibility: support where 'a'=1 (not supported by Derby, PostgreSQL)
</li><li>
MySQL, HSQLDB compatibility: support where 'a'=1 (not supported by Derby, PostgreSQL)
</li><li>
Support a data type "timestamp with timezone" using java.util.Calendar.
</li><li>
Finer granularity for SLF4J trace - See http://code.google.com/p/h2database/issues/detail?id=62
</li><li>
Finer granularity for SLF4J trace - See http://code.google.com/p/h2database/issues/detail?id=62
</li><li>
Add database creation date and time to the database.
</li><li>
Add database creation date and time to the database.
</li><li>
Support ASSERTION.
</li><li>
Support ASSERTION.
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
7165c79b
...
@@ -788,6 +788,10 @@ The date data type."
...
@@ -788,6 +788,10 @@ The date data type."
{ TIMESTAMP | DATETIME | SMALLDATETIME }
{ TIMESTAMP | DATETIME | SMALLDATETIME }
","
","
The timestamp data type."
The timestamp data type."
"Data Types","TIMESTAMP WITH TIMEZONE Type","
TIMESTAMP WITH TIMEZONE
","
VERY MUCH STILL IN TESTING."
"Data Types","BINARY Type","
"Data Types","BINARY Type","
{ BINARY | VARBINARY | LONGVARBINARY | RAW | BYTEA } [ ( precisionInt ) ]
{ BINARY | VARBINARY | LONGVARBINARY | RAW | BYTEA } [ ( precisionInt ) ]
","
","
...
...
h2/src/main/org/h2/value/ValueTimestampTimeZone.java
浏览文件 @
7165c79b
...
@@ -290,18 +290,27 @@ public class ValueTimestampTimeZone extends Value {
...
@@ -290,18 +290,27 @@ public class ValueTimestampTimeZone extends Value {
@Override
@Override
protected
int
compareSecure
(
Value
o
,
CompareMode
mode
)
{
protected
int
compareSecure
(
Value
o
,
CompareMode
mode
)
{
ValueTimestampTimeZone
t
=
(
ValueTimestampTimeZone
)
o
;
ValueTimestampTimeZone
t
=
(
ValueTimestampTimeZone
)
o
;
// We are pretending that the dateValue is in UTC because that gives us a stable sort
// even if the DST database changes.
// convert to minutes and add timezone offset
long
a
=
DateTimeUtils
.
convertDateValueToMillis
(
TimeZone
.
getTimeZone
(
"UTC"
),
dateValue
)
/
(
1000L
*
60L
);
long
a
=
DateTimeUtils
.
convertDateValueToMillis
(
TimeZone
.
getTimeZone
(
"UTC"
),
dateValue
)
/
(
1000L
*
60L
);
long
ma
=
timeNanos
/
(
1000L
*
1000L
*
1000L
*
60L
);
long
ma
=
timeNanos
/
(
1000L
*
1000L
*
1000L
*
60L
);
a
+=
ma
;
a
+=
ma
;
a
-=
timeZoneOffsetMins
;
a
-=
timeZoneOffsetMins
;
// convert to minutes and add timezone offset
long
b
=
DateTimeUtils
.
convertDateValueToMillis
(
TimeZone
.
getTimeZone
(
"UTC"
),
t
.
dateValue
)
/
(
1000L
*
60L
);
long
b
=
DateTimeUtils
.
convertDateValueToMillis
(
TimeZone
.
getTimeZone
(
"UTC"
),
t
.
dateValue
)
/
(
1000L
*
60L
);
long
mb
=
t
.
timeNanos
/
(
1000L
*
1000L
*
1000L
*
60L
);
long
mb
=
t
.
timeNanos
/
(
1000L
*
1000L
*
1000L
*
60L
);
b
+=
mb
;
b
+=
mb
;
b
-=
t
.
timeZoneOffsetMins
;
b
-=
t
.
timeZoneOffsetMins
;
// compare date
int
c
=
MathUtils
.
compareLong
(
a
,
b
);
int
c
=
MathUtils
.
compareLong
(
a
,
b
);
if
(
c
!=
0
)
{
if
(
c
!=
0
)
{
return
c
;
return
c
;
}
}
// compare time
long
na
=
timeNanos
-
(
ma
*
1000L
*
1000L
*
1000L
*
60L
);
long
na
=
timeNanos
-
(
ma
*
1000L
*
1000L
*
1000L
*
60L
);
long
nb
=
t
.
timeNanos
-
(
mb
*
1000L
*
1000L
*
1000L
*
60L
);
long
nb
=
t
.
timeNanos
-
(
mb
*
1000L
*
1000L
*
1000L
*
60L
);
return
MathUtils
.
compareLong
(
na
,
nb
);
return
MathUtils
.
compareLong
(
na
,
nb
);
...
...
h2/src/main/org/h2/value/ValueTimestampUtc.java
浏览文件 @
7165c79b
...
@@ -15,7 +15,7 @@ import org.h2.util.MathUtils;
...
@@ -15,7 +15,7 @@ import org.h2.util.MathUtils;
import
org.h2.util.StringUtils
;
import
org.h2.util.StringUtils
;
/**
/**
* Implementation of the TIMESTAMP data type.
* Implementation of the TIMESTAMP
UTC
data type.
*/
*/
public
final
class
ValueTimestampUtc
extends
Value
{
public
final
class
ValueTimestampUtc
extends
Value
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论