Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
8e262fe8
提交
8e262fe8
authored
3月 07, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use >> in scripts/functions/numeric
上级
f7e5b345
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
15 行增加
和
57 行删除
+15
-57
abs.sql
h2/src/test/org/h2/test/scripts/functions/numeric/abs.sql
+2
-5
decrypt.sql
...rc/test/org/h2/test/scripts/functions/numeric/decrypt.sql
+2
-9
encrypt.sql
...rc/test/org/h2/test/scripts/functions/numeric/encrypt.sql
+3
-13
hash.sql
h2/src/test/org/h2/test/scripts/functions/numeric/hash.sql
+2
-8
pi.sql
h2/src/test/org/h2/test/scripts/functions/numeric/pi.sql
+2
-8
rand.sql
h2/src/test/org/h2/test/scripts/functions/numeric/rand.sql
+2
-9
truncate.sql
...c/test/org/h2/test/scripts/functions/numeric/truncate.sql
+2
-5
没有找到文件。
h2/src/test/org/h2/test/scripts/functions/numeric/abs.sql
浏览文件 @
8e262fe8
...
...
@@ -15,11 +15,8 @@ select abs(-1) r1, abs(id) r1b from test;
>
1
1
>
rows
:
1
select
abs
(
sum
(
id
))
r1
from
test
;
>
R1
>
--
>
1
>
rows
:
1
select
abs
(
sum
(
id
))
from
test
;
>>
1
select
abs
(
null
)
vn
,
abs
(
-
1
)
r1
,
abs
(
1
)
r2
,
abs
(
0
)
r3
,
abs
(
-
0
.
1
)
r4
,
abs
(
0
.
1
)
r5
from
test
;
>
VN
R1
R2
R3
R4
R5
...
...
h2/src/test/org/h2/test/scripts/functions/numeric/decrypt.sql
浏览文件 @
8e262fe8
...
...
@@ -4,14 +4,7 @@
--
call
utf8tostring
(
decrypt
(
'AES'
,
'00000000000000000000000000000000'
,
'dbd42d55d4b923c4b03eba0396fac98e'
));
>
'Hello World Test'
>
------------------
>
Hello
World
Test
>
rows
:
1
>>
Hello
World
Test
call
utf8tostring
(
decrypt
(
'AES'
,
hash
(
'sha256'
,
stringtoutf8
(
'Hello'
),
1000
),
encrypt
(
'AES'
,
hash
(
'sha256'
,
stringtoutf8
(
'Hello'
),
1000
),
stringtoutf8
(
'Hello World Test'
))));
>
'Hello World Test'
>
------------------
>
Hello
World
Test
>
rows
:
1
>>
Hello
World
Test
h2/src/test/org/h2/test/scripts/functions/numeric/encrypt.sql
浏览文件 @
8e262fe8
...
...
@@ -4,20 +4,10 @@
--
call
encrypt
(
'AES'
,
'00000000000000000000000000000000'
,
stringtoutf8
(
'Hello World Test'
));
>
X
'dbd42d55d4b923c4b03eba0396fac98e'
>
-----------------------------------
>
dbd42d55d4b923c4b03eba0396fac98e
>
rows
:
1
>>
dbd42d55d4b923c4b03eba0396fac98e
CALL
ENCRYPT
(
'XTEA'
,
'00'
,
STRINGTOUTF8
(
'Test'
));
>
X
'8bc9a4601b3062692a72a5941072425f'
>
-----------------------------------
>
8
bc9a4601b3062692a72a5941072425f
>
rows
:
1
>>
8
bc9a4601b3062692a72a5941072425f
call
encrypt
(
'XTEA'
,
'000102030405060708090a0b0c0d0e0f'
,
'4142434445464748'
);
>
X
'dea0b0b40966b0669fbae58ab503765f'
>
-----------------------------------
>
dea0b0b40966b0669fbae58ab503765f
>
rows
:
1
>>
dea0b0b40966b0669fbae58ab503765f
h2/src/test/org/h2/test/scripts/functions/numeric/hash.sql
浏览文件 @
8e262fe8
...
...
@@ -4,13 +4,7 @@
--
call
hash
(
'SHA256'
,
stringtoutf8
(
'Hello'
),
1
);
>
X
'185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969'
>
-------------------------------------------------------------------
>
185
f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
>
rows
:
1
>>
185
f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
CALL
HASH
(
'SHA256'
,
STRINGTOUTF8
(
'Password'
),
1000
);
>
X
'c644a176ce920bde361ac336089b06cc2f1514dfa95ba5aabfe33f9a22d577f0'
>
-------------------------------------------------------------------
>
c644a176ce920bde361ac336089b06cc2f1514dfa95ba5aabfe33f9a22d577f0
>
rows
:
1
>>
c644a176ce920bde361ac336089b06cc2f1514dfa95ba5aabfe33f9a22d577f0
h2/src/test/org/h2/test/scripts/functions/numeric/pi.sql
浏览文件 @
8e262fe8
...
...
@@ -9,11 +9,5 @@ create memory table test(id int primary key, name varchar(255));
insert
into
test
values
(
1
,
'Hello'
);
>
update
count
:
1
select
pi
()
pi
from
test
;
>
PI
>
-----------------
>
3
.
141592653589793
>
rows
:
1
select
pi
()
from
test
;
>>
3
.
141592653589793
h2/src/test/org/h2/test/scripts/functions/numeric/rand.sql
浏览文件 @
8e262fe8
...
...
@@ -15,12 +15,5 @@ select rand(1) e, random() f from test;
>
0
.
7308781907032909
0
.
41008081149220166
>
rows
:
1
select
rand
()
e
from
test
;
>
E
>
-------------------
>
0
.
20771484130971707
>
rows
:
1
select
rand
()
from
test
;
>>
0
.
20771484130971707
h2/src/test/org/h2/test/scripts/functions/numeric/truncate.sql
浏览文件 @
8e262fe8
...
...
@@ -21,8 +21,5 @@ select trunc(null, null) en, trunc(1.99, 0) e1, trunc(-10.9, 0) em10 from test;
>
null
1
.
0
-
10
.
0
>
rows
:
1
select
trunc
(
1
.
3
)
R
;
>
R
>
---
>
1
.
0
>
rows
:
1
select
trunc
(
1
.
3
);
>>
1
.
0
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论