Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
6215e945
提交
6215e945
authored
16 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
BITOR, BITAND, BITXOR, and MOD use BIGINT
上级
2bbf093a
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
15 行删除
+18
-15
changelog.html
h2/src/docsrc/html/changelog.html
+3
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-0
Function.java
h2/src/main/org/h2/expression/Function.java
+10
-10
help.csv
h2/src/main/org/h2/res/help.csv
+4
-4
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
6215e945
...
...
@@ -18,7 +18,9 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Could not use the same linked table multiple times in the same query.
<ul><li>
The functions BITOR, BITAND, BITXOR, and MOD now accept
and return BIGINT instead of INT.
</li><li>
Could not use the same linked table multiple times in the same query.
</li><li>
A bug in the server-less multi-connection mode has been fixed.
</li><li>
Column names could not be named "UNIQUE" (with the quotes).
</li><li>
New system function TRANSACTION_ID() to get the current transaction
...
...
This diff is collapsed.
Click to expand it.
h2/src/docsrc/html/roadmap.html
浏览文件 @
6215e945
...
...
@@ -408,6 +408,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
RunScript should be able to read from system in (or quite mode for Shell).
</li><li>
Natural join: support select x from dual natural join dual.
</li><li>
Optimize IN(...) for DELETE and UPDATE.
</li><li>
Natural join: somehow support this: select a.x, b.x, x from dual a natural join dual b
</li></ul>
<h2>
Not Planned
</h2>
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/expression/Function.java
浏览文件 @
6215e945
...
...
@@ -166,9 +166,9 @@ public class Function extends Expression implements FunctionCall {
addFunction
(
"ASIN"
,
ASIN
,
1
,
Value
.
DOUBLE
);
addFunction
(
"ATAN"
,
ATAN
,
1
,
Value
.
DOUBLE
);
addFunction
(
"ATAN2"
,
ATAN2
,
2
,
Value
.
DOUBLE
);
addFunction
(
"BITAND"
,
BITAND
,
2
,
Value
.
INT
);
addFunction
(
"BITOR"
,
BITOR
,
2
,
Value
.
INT
);
addFunction
(
"BITXOR"
,
BITXOR
,
2
,
Value
.
INT
);
addFunction
(
"BITAND"
,
BITAND
,
2
,
Value
.
LONG
);
addFunction
(
"BITOR"
,
BITOR
,
2
,
Value
.
LONG
);
addFunction
(
"BITXOR"
,
BITXOR
,
2
,
Value
.
LONG
);
addFunction
(
"CEILING"
,
CEILING
,
1
,
Value
.
DOUBLE
);
addFunction
(
"COS"
,
COS
,
1
,
Value
.
DOUBLE
);
addFunction
(
"COT"
,
COT
,
1
,
Value
.
DOUBLE
);
...
...
@@ -177,7 +177,7 @@ public class Function extends Expression implements FunctionCall {
addFunction
(
"FLOOR"
,
FLOOR
,
1
,
Value
.
DOUBLE
);
addFunction
(
"LOG"
,
LOG
,
1
,
Value
.
DOUBLE
);
addFunction
(
"LOG10"
,
LOG10
,
1
,
Value
.
DOUBLE
);
addFunction
(
"MOD"
,
MOD
,
2
,
Value
.
INT
);
addFunction
(
"MOD"
,
MOD
,
2
,
Value
.
LONG
);
addFunction
(
"PI"
,
PI
,
0
,
Value
.
DOUBLE
);
addFunction
(
"POWER"
,
POWER
,
2
,
Value
.
DOUBLE
);
addFunction
(
"RADIANS"
,
RADIANS
,
1
,
Value
.
DOUBLE
);
...
...
@@ -869,20 +869,20 @@ public class Function extends Expression implements FunctionCall {
result
=
ValueDouble
.
get
(
Math
.
atan2
(
v0
.
getDouble
(),
v1
.
getDouble
()));
break
;
case
BITAND:
result
=
Value
Int
.
get
(
v0
.
getInt
()
&
v1
.
getInt
());
result
=
Value
Long
.
get
(
v0
.
getLong
()
&
v1
.
getLong
());
break
;
case
BITOR:
result
=
Value
Int
.
get
(
v0
.
getInt
()
|
v1
.
getInt
());
result
=
Value
Long
.
get
(
v0
.
getLong
()
|
v1
.
getLong
());
break
;
case
BITXOR:
result
=
Value
Int
.
get
(
v0
.
getInt
()
^
v1
.
getInt
());
result
=
Value
Long
.
get
(
v0
.
getLong
()
^
v1
.
getLong
());
break
;
case
MOD:
{
int
x
=
v1
.
getInt
();
if
(
x
==
0
.0
)
{
long
x
=
v1
.
getLong
();
if
(
x
==
0
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
DIVISION_BY_ZERO_1
,
getSQL
());
}
result
=
Value
Int
.
get
(
v0
.
getInt
()
%
x
);
result
=
Value
Long
.
get
(
v0
.
getLong
()
%
x
);
break
;
}
case
POWER:
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/help.csv
浏览文件 @
6215e945
...
...
@@ -2056,7 +2056,7 @@ ATAN2(X, Y)
"
"Functions (Numeric)","BITAND","
BITAND(
int, int): int
BITAND(
long, long): long
","
See also Java operator &.
","
...
...
@@ -2064,7 +2064,7 @@ BITAND(A, B)
"
"Functions (Numeric)","BITOR","
BITOR(
int, int): int
BITOR(
long, long): long
","
See also Java operator |.
","
...
...
@@ -2072,7 +2072,7 @@ BITOR(A, B)
"
"Functions (Numeric)","BITXOR","
BITXOR(
int, int): int
BITXOR(
long, long): long
","
See also Java operator ^.
","
...
...
@@ -2080,7 +2080,7 @@ BITXOR(A, B)
"
"Functions (Numeric)","MOD","
MOD(
int, int): int
MOD(
long, long): long
","
See also Java operator %.
","
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论