Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
5c69455f
提交
5c69455f
authored
10月 21, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Various CallableStatement methods could throw a NullPointerException.
上级
52f3bd34
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
1122 行增加
和
253 行删除
+1122
-253
changelog.html
h2/src/docsrc/html/changelog.html
+5
-1
JdbcCallableStatement.java
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
+1075
-233
JdbcPreparedStatement.java
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
+5
-3
JdbcResultSet.java
h2/src/main/org/h2/jdbc/JdbcResultSet.java
+19
-16
TestCallableStatement.java
h2/src/test/org/h2/test/jdbc/TestCallableStatement.java
+18
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
5c69455f
...
...
@@ -18,8 +18,12 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
LOB files were not deleted when running DROP ALL OBJECTS.
<ul><li>
Various CallableStatement methods could throw a NullPointerException.
</li><li>
LOB files were not deleted when running DROP ALL OBJECTS.
</li><li>
MS SQL Server compatibility: support string literals prefixed with N ("National Language" strings). Issue 240.
</li><li>
CAST: when converting a string to binary, it is hex encoded (every byte two characters);
a hex string can be converted to a number by first converting it to binary. Examples:
CAST(CAST('FFFF' AS BINARY) AS INT) = 65535, CAST(65535 AS BINARY) = '0000FFFF'.
</li><li>
When a domain (user defined data type) contained a user defined function, the database could not be opened.
</li><li>
CAST('011' AS INT) will no longer use decode the value as an octal number (using Integer.decode) but now use Integer.parseInt.
The same logic applied to byte, short, and long. This also means that trying to convert hex numbers (0x...) with CAST now fails.
...
...
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
浏览文件 @
5c69455f
差异被折叠。
点击展开。
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
浏览文件 @
5c69455f
...
...
@@ -945,7 +945,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of
byte
s
* @param length the number of
character
s
* @throws SQLException if this object is closed
*/
public
void
setCharacterStream
(
int
parameterIndex
,
Reader
x
,
int
length
)
throws
SQLException
{
...
...
@@ -972,7 +972,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of
byte
s
* @param length the number of
character
s
* @throws SQLException if this object is closed
*/
public
void
setCharacterStream
(
int
parameterIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
...
...
@@ -1300,7 +1300,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @param length the number of
byte
s
* @param length the number of
character
s
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
@@ -1402,6 +1402,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
* @throws SQLException if this object is closed
*/
public
void
setClob
(
int
parameterIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
...
...
@@ -1454,6 +1455,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
* @throws SQLException if this object is closed
*/
//## Java 1.6 begin ##
...
...
h2/src/main/org/h2/jdbc/JdbcResultSet.java
浏览文件 @
5c69455f
...
...
@@ -319,7 +319,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as a
String
.
* Returns the value of the specified column as a
BigDecimal
.
*
* @param columnIndex (1,2,...)
* @return the value
...
...
@@ -383,11 +383,12 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as a
String
.
* Returns the value of the specified column as a
BigDecimal
.
*
* @param columnLabel the column label
* @return the value
* @throws SQLException if the column is not found or if the result set is closed
* @throws SQLException if the column is not found or if the result set is
* closed
*/
public
BigDecimal
getBigDecimal
(
String
columnLabel
)
throws
SQLException
{
try
{
...
...
@@ -419,7 +420,8 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
*
* @param columnLabel the column label
* @return the value
* @throws SQLException if the column is not found or if the result set is closed
* @throws SQLException if the column is not found or if the result set is
* closed
*/
public
Time
getTime
(
String
columnLabel
)
throws
SQLException
{
try
{
...
...
@@ -435,7 +437,8 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
*
* @param columnLabel the column label
* @return the value
* @throws SQLException if the column is not found or if the result set is closed
* @throws SQLException if the column is not found or if the result set is
* closed
*/
public
Timestamp
getTimestamp
(
String
columnLabel
)
throws
SQLException
{
try
{
...
...
@@ -691,7 +694,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as a
String
.
* Returns the value of the specified column as a
BigDecimal
.
*
* @deprecated
*
...
...
@@ -716,7 +719,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as a
String
.
* Returns the value of the specified column as a
BigDecimal
.
*
* @deprecated
*
...
...
@@ -760,7 +763,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* [Not supported] Gets a column as a object using the specified type
* mapping.
*/
public
Object
getObject
(
int
columnIndex
,
Map
<
String
,
Class
<
?
>>
map
)
throws
SQLException
{
public
Object
getObject
(
int
columnIndex
,
Map
<
String
,
Class
<
?
>>
map
)
throws
SQLException
{
throw
unsupported
(
"map"
);
}
...
...
@@ -990,7 +993,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as input stream.
* Returns the value of the specified column as
an
input stream.
*
* @param columnIndex (1,2,...)
* @return the value
...
...
@@ -1007,7 +1010,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as input stream.
* Returns the value of the specified column as
an
input stream.
*
* @param columnLabel the column label
* @return the value
...
...
@@ -1101,7 +1104,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as input stream.
* Returns the value of the specified column as
an
input stream.
*
* @param columnIndex (1,2,...)
* @return the value
...
...
@@ -1119,7 +1122,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as input stream.
* Returns the value of the specified column as
an
input stream.
*
* @param columnLabel the column label
* @return the value
...
...
@@ -1137,7 +1140,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as
input stream
.
* Returns the value of the specified column as
a reader
.
*
* @param columnIndex (1,2,...)
* @return the value
...
...
@@ -1154,7 +1157,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns the value of the specified column as
input stream
.
* Returns the value of the specified column as
a reader
.
*
* @param columnLabel the column label
* @return the value
...
...
@@ -3286,7 +3289,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
//## Java 1.6 end ##
/**
* Returns the value of the specified column as
input stream
.
* Returns the value of the specified column as
a reader
.
*
* @param columnIndex (1,2,...)
* @return the value
...
...
@@ -3305,7 +3308,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
//## Java 1.6 end ##
/**
* Returns the value of the specified column as
input stream
.
* Returns the value of the specified column as
a reader
.
*
* @param columnLabel the column label
* @return the value
...
...
h2/src/test/org/h2/test/jdbc/TestCallableStatement.java
浏览文件 @
5c69455f
...
...
@@ -14,6 +14,7 @@ import java.sql.Statement;
import
java.sql.Timestamp
;
import
java.sql.Types
;
import
org.h2.constant.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.tools.SimpleResultSet
;
...
...
@@ -98,6 +99,23 @@ public class TestCallableStatement extends TestBase {
}
catch
(
SQLException
e
)
{
// expected exception
}
// test for exceptions after closing
call
.
close
();
try
{
call
.
executeUpdate
();
}
catch
(
SQLException
e
)
{
assertEquals
(
ErrorCode
.
OBJECT_CLOSED
,
e
.
getErrorCode
());
}
try
{
call
.
registerOutParameter
(
1
,
Types
.
INTEGER
);
}
catch
(
SQLException
e
)
{
assertEquals
(
ErrorCode
.
OBJECT_CLOSED
,
e
.
getErrorCode
());
}
try
{
call
.
getURL
(
"X"
);
}
catch
(
SQLException
e
)
{
assertEquals
(
ErrorCode
.
OBJECT_CLOSED
,
e
.
getErrorCode
());
}
}
/**
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论