Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
76c4fd22
提交
76c4fd22
authored
6 年前
作者:
migaman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move length test #1196
上级
ed405433
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
19 行删除
+12
-19
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+0
-19
length.sql
h2/src/test/org/h2/test/scripts/functions/string/length.sql
+12
-0
没有找到文件。
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
76c4fd22
...
@@ -127,7 +127,6 @@ public class TestFunctions extends TestDb implements AggregateFunction {
...
@@ -127,7 +127,6 @@ public class TestFunctions extends TestDb implements AggregateFunction {
testAnnotationProcessorsOutput
();
testAnnotationProcessorsOutput
();
testRound
();
testRound
();
testSignal
();
testSignal
();
testLength
();
deleteDb
(
"functions"
);
deleteDb
(
"functions"
);
}
}
...
@@ -2081,24 +2080,6 @@ public class TestFunctions extends TestDb implements AggregateFunction {
...
@@ -2081,24 +2080,6 @@ public class TestFunctions extends TestDb implements AggregateFunction {
conn
.
close
();
conn
.
close
();
}
}
private
void
testLength
()
throws
SQLException
{
deleteDb
(
"functions"
);
Connection
conn
=
getConnection
(
"functions"
);
Statement
stat
=
conn
.
createStatement
();
final
ResultSet
rs
=
stat
.
executeQuery
(
"select LENGTH('This has 17 chars'), LEN('MSSQLServer uses the len keyword') from dual"
);
rs
.
next
();
assertEquals
(
17
,
rs
.
getInt
(
1
));
assertEquals
(
32
,
rs
.
getInt
(
2
));
rs
.
close
();
conn
.
close
();
}
private
void
testThatCurrentTimestampIsSane
()
throws
SQLException
,
private
void
testThatCurrentTimestampIsSane
()
throws
SQLException
,
ParseException
{
ParseException
{
deleteDb
(
"functions"
);
deleteDb
(
"functions"
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/functions/string/length.sql
浏览文件 @
76c4fd22
...
@@ -2,3 +2,15 @@
...
@@ -2,3 +2,15 @@
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
-- Initial Developer: H2 Group
--
--
create
memory
table
test
(
id
int
primary
key
,
name
varchar
(
255
));
>
ok
insert
into
test
values
(
1
,
'Hello'
);
>
update
count
:
1
select
length
(
null
)
en
,
len
(
null
)
en2
,
length
(
'This has 17 chars'
)
e_17
,
len
(
'MSSQLServer uses the len keyword'
)
e_32
from
test
;
>
EN
EN2
E_17
E_32
>
---- ---- ---- ----
>
null
null
17
32
>
rows
:
1
\ No newline at end of file
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论