Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
80f69f1a
提交
80f69f1a
authored
13 年前
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make TRUNC and alias for TRUNCATE for compatibility with more databases.
Patch contributed by lukas.eder@gmail.com
上级
1f1226d1
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
1 行删除
+10
-1
help.csv
h2/src/docsrc/help/help.csv
+1
-1
changelog.html
h2/src/docsrc/html/changelog.html
+1
-0
Function.java
h2/src/main/org/h2/expression/Function.java
+2
-0
test-1.3.txt
h2/src/test/org/h2/test/test-1.3.txt
+6
-0
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
80f69f1a
...
@@ -2785,7 +2785,7 @@ CALL HASH('SHA256', STRINGTOUTF8('Password'), 1000)
...
@@ -2785,7 +2785,7 @@ CALL HASH('SHA256', STRINGTOUTF8('Password'), 1000)
"
"
"Functions (Numeric)","TRUNCATE","
"Functions (Numeric)","TRUNCATE","
TRUNCATE
(numeric, digitsInt)
{ TRUNC | TRUNCATE }
(numeric, digitsInt)
","
","
Truncates to a number of digits (to the next value closer to 0).
Truncates to a number of digits (to the next value closer to 0).
This method returns a double.
This method returns a double.
...
...
This diff is collapsed.
Click to expand it.
h2/src/docsrc/html/changelog.html
浏览文件 @
80f69f1a
...
@@ -22,6 +22,7 @@ Change Log
...
@@ -22,6 +22,7 @@ Change Log
</li><li>
The table INFORMATION_SCHEMA.FUNCTION_ALIASES now includes a column TYPE_NAME.
</li><li>
The table INFORMATION_SCHEMA.FUNCTION_ALIASES now includes a column TYPE_NAME.
</li><li>
Issue 378: when using views, the wrong values were bound to a parameter in some cases.
</li><li>
Issue 378: when using views, the wrong values were bound to a parameter in some cases.
</li><li>
Terrence Huang has translated the error messages to Chinese. Thanks a lot!
</li><li>
Terrence Huang has translated the error messages to Chinese. Thanks a lot!
</li><li>
TRUNC was added as an alias for TRUNCATE
</li></ul>
</li></ul>
<h2>
Version 1.3.166 (2012-04-08)
</h2>
<h2>
Version 1.3.166 (2012-04-08)
</h2>
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/expression/Function.java
浏览文件 @
80f69f1a
...
@@ -201,6 +201,8 @@ public class Function extends Expression implements FunctionCall {
...
@@ -201,6 +201,8 @@ public class Function extends Expression implements FunctionCall {
addFunction
(
"TAN"
,
TAN
,
1
,
Value
.
DOUBLE
);
addFunction
(
"TAN"
,
TAN
,
1
,
Value
.
DOUBLE
);
addFunction
(
"TANH"
,
TANH
,
1
,
Value
.
DOUBLE
);
addFunction
(
"TANH"
,
TANH
,
1
,
Value
.
DOUBLE
);
addFunction
(
"TRUNCATE"
,
TRUNCATE
,
2
,
Value
.
DOUBLE
);
addFunction
(
"TRUNCATE"
,
TRUNCATE
,
2
,
Value
.
DOUBLE
);
// same as TRUNCATE
addFunction
(
"TRUNC"
,
TRUNCATE
,
2
,
Value
.
DOUBLE
);
addFunction
(
"HASH"
,
HASH
,
3
,
Value
.
BYTES
);
addFunction
(
"HASH"
,
HASH
,
3
,
Value
.
BYTES
);
addFunction
(
"ENCRYPT"
,
ENCRYPT
,
3
,
Value
.
BYTES
);
addFunction
(
"ENCRYPT"
,
ENCRYPT
,
3
,
Value
.
BYTES
);
addFunction
(
"DECRYPT"
,
DECRYPT
,
3
,
Value
.
BYTES
);
addFunction
(
"DECRYPT"
,
DECRYPT
,
3
,
Value
.
BYTES
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/test-1.3.txt
浏览文件 @
80f69f1a
...
@@ -9253,6 +9253,12 @@ select truncate(null, null) en, truncate(1.99, 0) e1, truncate(-10.9, 0) em10 fr
...
@@ -9253,6 +9253,12 @@ select truncate(null, null) en, truncate(1.99, 0) e1, truncate(-10.9, 0) em10 fr
> null 1.0 -10.0
> null 1.0 -10.0
> rows: 1
> rows: 1
select trunc(null, null) en, trunc(1.99, 0) e1, trunc(-10.9, 0) em10 from test;
> EN E1 EM10
> ---- --- -----
> null 1.0 -10.0
> rows: 1
select ascii(null) en, ascii('') en, ascii('Abc') e65 from test;
select ascii(null) en, ascii('') en, ascii('Abc') e65 from test;
> EN EN E65
> EN EN E65
> ---- ---- ---
> ---- ---- ---
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论