Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
661b12bb
提交
661b12bb
authored
14 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improved javadoc documentation.
上级
240ec323
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
128 行增加
和
60 行删除
+128
-60
JdbcCallableStatement.java
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
+11
-7
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+40
-7
JdbcPreparedStatement.java
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
+27
-9
JdbcResultSet.java
h2/src/main/org/h2/jdbc/JdbcResultSet.java
+2
-0
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+18
-6
Value.java
h2/src/main/org/h2/value/Value.java
+1
-0
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+28
-29
Doclet.java
h2/src/tools/org/h2/build/doclet/Doclet.java
+1
-2
没有找到文件。
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
浏览文件 @
661b12bb
...
...
@@ -293,6 +293,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @deprecated
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param scale is ignored
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
...
...
@@ -970,7 +971,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the
number of byte
s
* @param length the
maximum number of character
s
* @throws SQLException if this object is closed
*/
public
void
setCharacterStream
(
String
parameterName
,
Reader
x
,
int
length
)
throws
SQLException
{
...
...
@@ -1025,7 +1026,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setBinaryStream
(
String
parameterName
,
InputStream
x
,
int
length
)
throws
SQLException
{
...
...
@@ -1039,7 +1040,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setAsciiStream
(
String
parameterName
,
...
...
@@ -1228,7 +1229,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the
number of byte
s
* @param length the
maximum number of character
s
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1259,6 +1260,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the maximum number of characters
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1275,6 +1277,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the maximum number of bytes
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1291,6 +1294,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the maximum number of characters
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1350,7 +1354,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setAsciiStream
(
String
parameterName
,
...
...
@@ -1381,7 +1385,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1430,7 +1434,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
*
* @param parameterName the parameter name
* @param x the value
* @param length the number of characters
* @param length the
maximum
number of characters
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
661b12bb
...
...
@@ -171,6 +171,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Creates a statement with the specified result set type and concurrency.
*
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @return the statement
* @throws SQLException
* if the connection is closed or the result set type or
...
...
@@ -194,6 +196,9 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a statement with the specified result set type, concurrency, and
* holdability.
*
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @param resultSetHoldability the holdability (ResultSet.HOLD* / CLOSE*)
* @return the statement
* @throws SQLException if the connection is closed or the result set type,
* concurrency, or holdability are not supported
...
...
@@ -218,6 +223,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Creates a new prepared statement.
*
* @param sql the SQL statement
* @return the prepared statement
* @throws SQLException
* if the connection is closed
...
...
@@ -240,7 +246,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* Prepare a statement that will automatically close when the result set is
* closed. This method is used to retrieve database meta data.
*
* @param sql the SQL statement
.
* @param sql the SQL statement
* @return the prepared statement
*/
PreparedStatement
prepareAutoCloseStatement
(
String
sql
)
throws
SQLException
{
...
...
@@ -445,6 +451,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Translates a SQL statement into the database grammar.
*
* @param sql the SQL statement with or without JDBC escape sequences
* @return the translated statement
* @throws SQLException
* if the connection is closed
...
...
@@ -464,6 +471,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* setting is only a hint to the database to enable optimizations - it does
* not cause writes to be prohibited.
*
* @param readOnly ignored
* @throws SQLException
* if the connection is closed
*/
...
...
@@ -503,6 +511,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* Set the default catalog name.
* This call is ignored.
*
* @param catalog ignored
* @throws SQLException if the connection is closed
*/
public
void
setCatalog
(
String
catalog
)
throws
SQLException
{
...
...
@@ -568,6 +577,9 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a prepared statement with the specified result set type and
* concurrency.
*
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @return the prepared statement
* @throws SQLException
* if the connection is closed or the result set type or
...
...
@@ -784,6 +796,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Creates a new callable statement.
*
* @param sql the SQL statement
* @return the callable statement
* @throws SQLException
* if the connection is closed or the statement is not valid
...
...
@@ -806,6 +819,9 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a callable statement with the specified result set type and
* concurrency.
*
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @return the callable statement
* @throws SQLException
* if the connection is closed or the result set type or
...
...
@@ -830,6 +846,10 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a callable statement with the specified result set type,
* concurrency, and holdability.
*
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @param resultSetHoldability the holdability (ResultSet.HOLD* / CLOSE*)
* @return the callable statement
* @throws SQLException
* if the connection is closed or the result set type,
...
...
@@ -952,6 +972,10 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a prepared statement with the specified result set type,
* concurrency, and holdability.
*
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @param resultSetHoldability the holdability (ResultSet.HOLD* / CLOSE*)
* @return the prepared statement
* @throws SQLException if the connection is closed or the result set type,
* concurrency, or holdability are not supported
...
...
@@ -975,9 +999,12 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Creates a new prepared statement. This method just calls
* prepareStatement(String sql).
* Creates a new prepared statement.
* This method just calls prepareStatement(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the prepared statement
* @throws SQLException
* if the connection is closed
...
...
@@ -994,9 +1021,12 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Creates a new prepared statement. This method just calls
* prepareStatement(String sql).
* Creates a new prepared statement.
* This method just calls prepareStatement(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param columnIndexes ignored
* @return the prepared statement
* @throws SQLException
* if the connection is closed
...
...
@@ -1013,9 +1043,12 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Creates a new prepared statement. This method just calls
* prepareStatement(String sql).
* Creates a new prepared statement.
* This method just calls prepareStatement(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param columnNames ignored
* @return the prepared statement
* @throws SQLException
* if the connection is closed
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
浏览文件 @
661b12bb
...
...
@@ -216,6 +216,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @throws SQLException Unsupported Feature
*/
public
ResultSet
executeQuery
(
String
sql
)
throws
SQLException
{
...
...
@@ -230,6 +231,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @throws SQLException Unsupported Feature
*/
public
void
addBatch
(
String
sql
)
throws
SQLException
{
...
...
@@ -244,6 +246,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
)
throws
SQLException
{
...
...
@@ -258,6 +261,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
)
throws
SQLException
{
...
...
@@ -664,6 +668,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* [Not supported] This feature is deprecated and not supported.
*
* @deprecated
*/
public
void
setUnicodeStream
(
int
parameterIndex
,
InputStream
x
,
int
length
)
throws
SQLException
{
...
...
@@ -837,7 +842,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setBinaryStream
(
int
parameterIndex
,
InputStream
x
,
long
length
)
throws
SQLException
{
...
...
@@ -864,7 +869,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setBinaryStream
(
int
parameterIndex
,
InputStream
x
,
int
length
)
throws
SQLException
{
...
...
@@ -891,7 +896,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setAsciiStream
(
int
parameterIndex
,
InputStream
x
,
int
length
)
throws
SQLException
{
...
...
@@ -905,7 +910,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of bytes
* @param length the
maximum
number of bytes
* @throws SQLException if this object is closed
*/
public
void
setAsciiStream
(
int
parameterIndex
,
InputStream
x
,
long
length
)
throws
SQLException
{
...
...
@@ -945,7 +950,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of characters
* @param length the
maximum
number of characters
* @throws SQLException if this object is closed
*/
public
void
setCharacterStream
(
int
parameterIndex
,
Reader
x
,
int
length
)
throws
SQLException
{
...
...
@@ -972,7 +977,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of characters
* @param length the
maximum
number of characters
* @throws SQLException if this object is closed
*/
public
void
setCharacterStream
(
int
parameterIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
...
...
@@ -1146,6 +1151,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @param autoGeneratedKeys ignored
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
...
...
@@ -1161,6 +1168,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @param columnIndexes ignored
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
,
int
[]
columnIndexes
)
throws
SQLException
{
...
...
@@ -1175,6 +1184,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @param columnNames ignored
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
,
String
[]
columnNames
)
throws
SQLException
{
...
...
@@ -1189,6 +1200,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @param autoGeneratedKeys ignored
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
...
...
@@ -1203,6 +1216,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @param columnIndexes ignored
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
,
int
[]
columnIndexes
)
throws
SQLException
{
...
...
@@ -1217,6 +1232,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @param sql ignored
* @param columnNames ignored
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
,
String
[]
columnNames
)
throws
SQLException
{
...
...
@@ -1300,7 +1317,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of characters
* @param length the
maximum
number of characters
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1402,7 +1419,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of characters
* @param length the
maximum
number of characters
* @throws SQLException if this object is closed
*/
public
void
setClob
(
int
parameterIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
...
...
@@ -1429,6 +1446,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the maximum number of bytes
* @throws SQLException if this object is closed
*/
public
void
setBlob
(
int
parameterIndex
,
InputStream
x
,
long
length
)
throws
SQLException
{
...
...
@@ -1455,7 +1473,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of characters
* @param length the
maximum
number of characters
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcResultSet.java
浏览文件 @
661b12bb
...
...
@@ -699,6 +699,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @deprecated
*
* @param columnLabel the column label
* @param scale the scale of the returned value
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
...
...
@@ -724,6 +725,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @deprecated
*
* @param columnIndex (1,2,...)
* @param scale the scale of the returned value
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
661b12bb
...
...
@@ -705,9 +705,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql).
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
...
...
@@ -727,9 +729,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql).
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param columnIndexes ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
...
...
@@ -749,9 +753,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql).
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param columnNames ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
...
...
@@ -771,9 +777,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Executes a statement and returns the update count.
* This method just calls execute(String sql).
* This method just calls execute(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
...
...
@@ -793,9 +801,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Executes a statement and returns the update count.
* This method just calls execute(String sql).
* This method just calls execute(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param columnIndexes ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
...
...
@@ -815,9 +825,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Executes a statement and returns the update count.
* This method just calls execute(String sql).
* This method just calls execute(String sql) internally.
* The method getGeneratedKeys only supports one column.
*
* @param sql the SQL statement
* @param columnNames ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/value/Value.java
浏览文件 @
661b12bb
...
...
@@ -1027,6 +1027,7 @@ public abstract class Value {
/**
* Throw the exception that the feature is not support for the given data type.
*
* @param op the operation
* @return never returns normally
* @throws the exception
*/
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
661b12bb
...
...
@@ -260,60 +260,57 @@ public abstract class TestBase {
}
if
(!
config
.
memory
)
{
if
(
config
.
smallLog
&&
admin
)
{
url
+=
";MAX_LOG_SIZE=1"
;
url
=
addOption
(
url
,
"MAX_LOG_SIZE"
,
"1"
)
;
}
}
if
(
config
.
traceSystemOut
)
{
url
+=
";TRACE_LEVEL_SYSTEM_OUT=2"
;
url
=
addOption
(
url
,
"TRACE_LEVEL_SYSTEM_OUT"
,
"2"
)
;
}
if
(
config
.
traceLevelFile
>
0
&&
admin
)
{
if
(
url
.
indexOf
(
";TRACE_LEVEL_FILE="
)
<
0
)
{
url
+=
";TRACE_LEVEL_FILE="
+
config
.
traceLevelFile
;
}
if
(
url
.
indexOf
(
";TRACE_MAX_FILE_SIZE="
)
<
0
)
{
url
+=
";TRACE_MAX_FILE_SIZE=8"
;
}
}
if
(
url
.
indexOf
(
";LOG="
)
<
0
)
{
url
+=
";LOG=1"
;
url
=
addOption
(
url
,
"TRACE_LEVEL_FILE"
,
""
+
config
.
traceLevelFile
);
url
=
addOption
(
url
,
"TRACE_MAX_FILE_SIZE"
,
"8"
);
}
url
=
addOption
(
url
,
"LOG"
,
"1"
);
if
(
config
.
throttle
>
0
)
{
url
+=
";THROTTLE="
+
config
.
throttle
;
}
if
(
url
.
indexOf
(
";LOCK_TIMEOUT="
)
<
0
)
{
url
+=
";LOCK_TIMEOUT=50"
;
url
=
addOption
(
url
,
"THROTTLE"
,
""
+
config
.
throttle
);
}
url
=
addOption
(
url
,
"LOCK_TIMEOUT"
,
"50"
);
if
(
config
.
diskUndo
&&
admin
)
{
url
+=
";MAX_MEMORY_UNDO=3"
;
url
=
addOption
(
url
,
"MAX_MEMORY_UNDO"
,
"3"
)
;
}
if
(
config
.
big
&&
admin
&&
url
.
indexOf
(
";MAX_OPERATION_MEMORY="
)
<=
0
)
{
if
(
config
.
big
&&
admin
)
{
// force operations to disk
url
+=
";MAX_OPERATION_MEMORY=1"
;
url
=
addOption
(
url
,
"MAX_OPERATION_MEMORY"
,
"1"
)
;
}
if
(
config
.
mvcc
&&
url
.
indexOf
(
";MVCC="
)
<
0
)
{
url
+=
";MVCC=TRUE"
;
if
(
config
.
mvcc
)
{
url
=
addOption
(
url
,
"MVCC"
,
"TRUE"
)
;
}
if
(
config
.
cacheType
!=
null
&&
admin
&&
url
.
indexOf
(
";CACHE_TYPE="
)
<
0
)
{
url
+=
";CACHE_TYPE="
+
config
.
cacheType
;
if
(
config
.
cacheType
!=
null
&&
admin
)
{
url
=
addOption
(
url
,
"CACHE_TYPE"
,
config
.
cacheType
)
;
}
if
(
config
.
diskResult
&&
admin
)
{
url
+=
";MAX_MEMORY_ROWS=100"
;
if
(
url
.
indexOf
(
";CACHE_SIZE="
)
<
0
)
{
url
+=
";CACHE_SIZE=0"
;
}
url
=
addOption
(
url
,
"MAX_MEMORY_ROWS"
,
"100"
);
url
=
addOption
(
url
,
"CACHE_SIZE"
,
"0"
);
}
if
(
config
.
cipher
!=
null
)
{
url
+=
";CIPHER="
+
config
.
cipher
;
url
=
addOption
(
url
,
"CIPHER"
,
config
.
cipher
)
;
}
if
(
config
.
defrag
)
{
url
+=
";DEFRAG_ALWAYS=TRUE"
;
url
=
addOption
(
url
,
"DEFRAG_ALWAYS"
,
"TRUE"
)
;
}
if
(
config
.
nestedJoins
)
{
url
+=
";NESTED_JOINS=TRUE"
;
url
=
addOption
(
url
,
"NESTED_JOINS"
,
"TRUE"
)
;
}
return
"jdbc:h2:"
+
url
;
}
private
String
addOption
(
String
url
,
String
option
,
String
value
)
{
if
(
url
.
indexOf
(
";"
+
option
+
"="
)
<
0
)
{
url
+=
";"
+
option
+
"="
+
value
;
}
return
url
;
}
private
Connection
getConnectionInternal
(
String
url
,
String
user
,
String
password
)
throws
SQLException
{
org
.
h2
.
Driver
.
load
();
// url += ";DEFAULT_TABLE_TYPE=1";
...
...
@@ -584,6 +581,7 @@ public abstract class TestBase {
*
* @param expected the expected value
* @param actual the actual value
* @param len the maximum length, or -1
* @throws AssertionError if the values are not equal
*/
protected
void
assertEqualReaders
(
Reader
expected
,
Reader
actual
,
int
len
)
throws
IOException
{
...
...
@@ -604,6 +602,7 @@ public abstract class TestBase {
*
* @param expected the expected value
* @param actual the actual value
* @param len the maximum length, or -1
* @throws AssertionError if the values are not equal
*/
protected
void
assertEqualStreams
(
InputStream
expected
,
InputStream
actual
,
int
len
)
throws
IOException
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/doclet/Doclet.java
浏览文件 @
661b12bb
...
...
@@ -305,9 +305,8 @@ public class Doclet {
ThrowsTag
[]
throwsTags
=
method
.
throwsTags
();
boolean
hasThrowsTag
=
throwsTags
!=
null
&&
throwsTags
.
length
>
0
;
if
(
paramTags
.
length
!=
params
.
length
)
{
if
(
hasComment
&&
!
method
.
commentText
().
startsWith
(
"["
)
&&
!
hasThrowsTag
)
{
if
(
hasComment
&&
!
method
.
commentText
().
startsWith
(
"["
))
{
// [Not supported] and such are not problematic
// also not problematic are methods that always throw an exception
addError
(
"Undocumented parameter(s) ("
+
clazz
.
name
()
+
".java:"
+
method
.
position
().
line
()
+
") "
+
name
+
" documented: "
+
paramTags
.
length
+
" params: "
+
params
.
length
);
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论