Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
64d5d907
提交
64d5d907
authored
10月 17, 2017
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
these methods can be static
上级
31dfacb3
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
25 行增加
和
26 行删除
+25
-26
Parser.java
h2/src/main/org/h2/command/Parser.java
+1
-1
FullTextSettings.java
h2/src/main/org/h2/fulltext/FullTextSettings.java
+1
-1
CreateCluster.java
h2/src/main/org/h2/tools/CreateCluster.java
+2
-1
TestSetCollation.java
h2/src/test/org/h2/test/db/TestSetCollation.java
+2
-2
TestSynonymForTable.java
h2/src/test/org/h2/test/db/TestSynonymForTable.java
+7
-8
TestCustomDataTypesHandler.java
h2/src/test/org/h2/test/jdbc/TestCustomDataTypesHandler.java
+10
-11
TestConcurrentLinkedList.java
h2/src/test/org/h2/test/store/TestConcurrentLinkedList.java
+2
-2
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
64d5d907
...
...
@@ -3527,7 +3527,7 @@ public class Parser {
return
false
;
}
private
boolean
equalsTokenIgnoreCase
(
String
a
,
String
b
)
{
private
static
boolean
equalsTokenIgnoreCase
(
String
a
,
String
b
)
{
if
(
a
==
null
)
{
return
b
==
null
;
}
else
if
(
a
.
equals
(
b
))
{
...
...
h2/src/main/org/h2/fulltext/FullTextSettings.java
浏览文件 @
64d5d907
...
...
@@ -273,7 +273,7 @@ final class FullTextSettings {
return
whitespaceChars
;
}
private
String
normalizeWord
(
String
word
)
{
private
static
String
normalizeWord
(
String
word
)
{
// TODO this is locale specific, document
return
word
.
toUpperCase
();
}
...
...
h2/src/main/org/h2/tools/CreateCluster.java
浏览文件 @
64d5d907
...
...
@@ -98,7 +98,7 @@ public class CreateCluster extends Tool {
process
(
urlSource
,
urlTarget
,
user
,
password
,
serverList
);
}
private
void
process
(
String
urlSource
,
String
urlTarget
,
private
static
void
process
(
String
urlSource
,
String
urlTarget
,
String
user
,
String
password
,
String
serverList
)
throws
SQLException
{
Connection
connSource
=
null
,
connTarget
=
null
;
Statement
statSource
=
null
,
statTarget
=
null
;
...
...
@@ -171,6 +171,7 @@ public class CreateCluster extends Tool {
new
Thread
(
new
Runnable
(){
@Override
public
void
run
()
{
try
{
while
(
rs
.
next
())
{
...
...
h2/src/test/org/h2/test/db/TestSetCollation.java
浏览文件 @
64d5d907
...
...
@@ -168,7 +168,7 @@ public class TestSetCollation extends TestBase {
}
}
private
void
insertValues
(
Connection
con
,
String
[]
values
,
int
startId
)
throws
SQLException
{
private
static
void
insertValues
(
Connection
con
,
String
[]
values
,
int
startId
)
throws
SQLException
{
PreparedStatement
ps
=
con
.
prepareStatement
(
"INSERT INTO charsettable VALUES (?, ?)"
);
int
id
=
startId
;
for
(
String
value
:
values
)
{
...
...
@@ -179,7 +179,7 @@ public class TestSetCollation extends TestBase {
ps
.
close
();
}
private
List
<
String
>
loadTableValues
(
Connection
con
)
throws
SQLException
{
private
static
List
<
String
>
loadTableValues
(
Connection
con
)
throws
SQLException
{
List
<
String
>
results
=
new
ArrayList
<>();
Statement
statement
=
con
.
createStatement
();
ResultSet
resultSet
=
statement
.
executeQuery
(
"select testvalue from charsettable order by testvalue"
);
...
...
h2/src/test/org/h2/test/db/TestSynonymForTable.java
浏览文件 @
64d5d907
...
...
@@ -5,15 +5,14 @@
*/
package
org
.
h2
.
test
.
db
;
import
org.h2.engine.Constants
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.test.TestBase
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.engine.Constants
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.test.TestBase
;
/**
* Tests for table synonyms.
...
...
@@ -248,7 +247,7 @@ public class TestSynonymForTable extends TestBase {
conn
.
close
();
}
private
void
deleteFromSynonym
(
Connection
conn
,
int
id
)
throws
SQLException
{
private
static
void
deleteFromSynonym
(
Connection
conn
,
int
id
)
throws
SQLException
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
"DELETE FROM testsynonym WHERE id = ?"
);
prep
.
setInt
(
1
,
id
);
...
...
@@ -307,21 +306,21 @@ public class TestSynonymForTable extends TestBase {
assertFalse
(
rs
.
next
());
}
private
void
insertIntoSynonym
(
Connection
conn
,
int
id
)
throws
SQLException
{
private
static
void
insertIntoSynonym
(
Connection
conn
,
int
id
)
throws
SQLException
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
"INSERT INTO testsynonym VALUES(?)"
);
prep
.
setInt
(
1
,
id
);
prep
.
execute
();
}
private
void
insertIntoBackingTable
(
Connection
conn
,
int
id
)
throws
SQLException
{
private
static
void
insertIntoBackingTable
(
Connection
conn
,
int
id
)
throws
SQLException
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
"INSERT INTO backingtable VALUES(?)"
);
prep
.
setInt
(
1
,
id
);
prep
.
execute
();
}
private
void
createTableWithSynonym
(
Connection
conn
)
throws
SQLException
{
private
static
void
createTableWithSynonym
(
Connection
conn
)
throws
SQLException
{
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE TABLE IF NOT EXISTS backingtable(id INT PRIMARY KEY)"
);
stat
.
execute
(
"CREATE OR REPLACE SYNONYM testsynonym FOR backingtable"
);
...
...
h2/src/test/org/h2/test/jdbc/TestCustomDataTypesHandler.java
浏览文件 @
64d5d907
...
...
@@ -5,6 +5,15 @@
*/
package
org
.
h2
.
test
.
jdbc
;
import
java.io.Serializable
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.sql.Types
;
import
java.text.DecimalFormat
;
import
java.util.Locale
;
import
org.h2.api.CustomDataTypesHandler
;
import
org.h2.api.ErrorCode
;
import
org.h2.message.DbException
;
...
...
@@ -20,16 +29,6 @@ import org.h2.value.ValueDouble;
import
org.h2.value.ValueJavaObject
;
import
org.h2.value.ValueString
;
import
java.io.Serializable
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.sql.Types
;
import
java.text.DecimalFormat
;
import
java.util.Locale
;
/**
* Tests {@link CustomDataTypesHandler}.
*/
...
...
@@ -300,7 +299,7 @@ public class TestCustomDataTypesHandler extends TestBase {
}
/** Constructs data type instance for complex number type */
private
DataType
createComplex
()
{
private
static
DataType
createComplex
()
{
DataType
result
=
new
DataType
();
result
.
type
=
COMPLEX_DATA_TYPE_ID
;
result
.
name
=
COMPLEX_DATA_TYPE_NAME
;
...
...
h2/src/test/org/h2/test/store/TestConcurrentLinkedList.java
浏览文件 @
64d5d907
...
...
@@ -27,7 +27,7 @@ public class TestConcurrentLinkedList extends TestBase {
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestConcurrentLinkedList
test
=
(
TestConcurrentLinkedList
)
TestBase
.
createCaller
().
init
();
test
.
test
();
test
.
test
Performance
();
testPerformance
();
}
@Override
...
...
@@ -36,7 +36,7 @@ public class TestConcurrentLinkedList extends TestBase {
testConcurrent
();
}
private
void
testPerformance
()
{
private
static
void
testPerformance
()
{
testPerformance
(
true
);
testPerformance
(
false
);
testPerformance
(
true
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论