Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
10b085da
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
10b085da
编写于
8月 29, 2017
作者:
T
terrymanu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '1.5.3-SNAPSHOT' into 1.6.0-SNAPSHOT
上级
000b6a2d
e2f81500
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
292 addition
and
313 deletion
+292
-313
RELEASE-NOTES.md
RELEASE-NOTES.md
+6
-0
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/jdbc/core/resultset/ShardingResultSet.java
...e/rdb/sharding/jdbc/core/resultset/ShardingResultSet.java
+53
-159
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/ResultSetMerger.java
...dangdang/ddframe/rdb/sharding/merger/ResultSetMerger.java
+8
-0
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/common/AbstractDecoratorResultSetMerger.java
...rding/merger/common/AbstractDecoratorResultSetMerger.java
+5
-0
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/common/AbstractMemoryResultSetMerger.java
...sharding/merger/common/AbstractMemoryResultSetMerger.java
+19
-4
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/common/AbstractStreamResultSetMerger.java
...sharding/merger/common/AbstractStreamResultSetMerger.java
+201
-150
未找到文件。
RELEASE-NOTES.md
浏览文件 @
10b085da
## 1.5.3
### 缺陷修正
1.
[
ISSUE #349
](
https://github.com/dangdangdotcom/sharding-jdbc/issues/349
)
ResultSet.wasNull功能不正确
## 1.5.2
### 里程碑
...
...
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/jdbc/core/resultset/ShardingResultSet.java
浏览文件 @
10b085da
此差异已折叠。
点击以展开。
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/ResultSetMerger.java
浏览文件 @
10b085da
...
...
@@ -97,4 +97,12 @@ public interface ResultSetMerger {
* @throws SQLException SQL Exception
*/
InputStream
getInputStream
(
final
String
columnLabel
,
final
String
type
)
throws
SQLException
;
/**
* Adjust ResultSet is null or not.
*
* @return ResultSet is null or not
* @throws SQLException SQL Exception
*/
boolean
wasNull
()
throws
SQLException
;
}
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/common/AbstractDecoratorResultSetMerger.java
浏览文件 @
10b085da
...
...
@@ -65,4 +65,9 @@ public abstract class AbstractDecoratorResultSetMerger implements ResultSetMerge
public
InputStream
getInputStream
(
final
String
columnLabel
,
final
String
type
)
throws
SQLException
{
return
resultSetMerger
.
getInputStream
(
columnLabel
,
type
);
}
@Override
public
boolean
wasNull
()
throws
SQLException
{
return
resultSetMerger
.
wasNull
();
}
}
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/common/AbstractMemoryResultSetMerger.java
浏览文件 @
10b085da
...
...
@@ -44,12 +44,16 @@ public abstract class AbstractMemoryResultSetMerger implements ResultSetMerger {
@Setter
private
MemoryResultSetRow
currentResultSetRow
;
private
boolean
wasNull
;
@Override
public
Object
getValue
(
final
int
columnIndex
,
final
Class
<?>
type
)
throws
SQLException
{
if
(
Blob
.
class
==
type
||
Clob
.
class
==
type
||
Reader
.
class
==
type
||
InputStream
.
class
==
type
||
SQLXML
.
class
==
type
)
{
throw
new
SQLFeatureNotSupportedException
();
}
return
currentResultSetRow
.
getCell
(
columnIndex
);
Object
result
=
currentResultSetRow
.
getCell
(
columnIndex
);
wasNull
=
null
==
result
;
return
result
;
}
@Override
...
...
@@ -57,19 +61,25 @@ public abstract class AbstractMemoryResultSetMerger implements ResultSetMerger {
if
(
Blob
.
class
==
type
||
Clob
.
class
==
type
||
Reader
.
class
==
type
||
InputStream
.
class
==
type
||
SQLXML
.
class
==
type
)
{
throw
new
SQLFeatureNotSupportedException
();
}
return
currentResultSetRow
.
getCell
(
labelAndIndexMap
.
get
(
columnLabel
));
Object
result
=
currentResultSetRow
.
getCell
(
labelAndIndexMap
.
get
(
columnLabel
));
wasNull
=
null
==
result
;
return
result
;
}
@Override
public
Object
getCalendarValue
(
final
int
columnIndex
,
final
Class
<?>
type
,
final
Calendar
calendar
)
throws
SQLException
{
// TODO 时间相关取值未实现calendar模式
return
currentResultSetRow
.
getCell
(
columnIndex
);
Object
result
=
currentResultSetRow
.
getCell
(
columnIndex
);
wasNull
=
null
==
result
;
return
result
;
}
@Override
public
Object
getCalendarValue
(
final
String
columnLabel
,
final
Class
<?>
type
,
final
Calendar
calendar
)
throws
SQLException
{
// TODO 时间相关取值未实现calendar模式
return
currentResultSetRow
.
getCell
(
labelAndIndexMap
.
get
(
columnLabel
));
Object
result
=
currentResultSetRow
.
getCell
(
labelAndIndexMap
.
get
(
columnLabel
));
wasNull
=
null
==
result
;
return
result
;
}
@Override
...
...
@@ -81,4 +91,9 @@ public abstract class AbstractMemoryResultSetMerger implements ResultSetMerger {
public
InputStream
getInputStream
(
final
String
columnLabel
,
final
String
type
)
throws
SQLException
{
throw
new
SQLFeatureNotSupportedException
();
}
@Override
public
boolean
wasNull
()
throws
SQLException
{
return
wasNull
;
}
}
sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/merger/common/AbstractStreamResultSetMerger.java
浏览文件 @
10b085da
...
...
@@ -44,6 +44,8 @@ public abstract class AbstractStreamResultSetMerger implements ResultSetMerger {
private
ResultSet
currentResultSet
;
private
boolean
wasNull
;
protected
ResultSet
getCurrentResultSet
()
throws
SQLException
{
if
(
null
==
currentResultSet
)
{
throw
new
SQLException
(
"Current ResultSet is null, ResultSet perhaps end of next."
);
...
...
@@ -53,183 +55,232 @@ public abstract class AbstractStreamResultSetMerger implements ResultSetMerger {
@Override
public
Object
getValue
(
final
int
columnIndex
,
final
Class
<?>
type
)
throws
SQLException
{
Object
result
;
if
(
Object
.
class
==
type
)
{
return
getCurrentResultSet
().
getObject
(
columnIndex
);
}
if
(
boolean
.
class
==
type
)
{
return
getCurrentResultSet
().
getBoolean
(
columnIndex
);
}
if
(
byte
.
class
==
type
)
{
return
getCurrentResultSet
().
getByte
(
columnIndex
);
}
if
(
short
.
class
==
type
)
{
return
getCurrentResultSet
().
getShort
(
columnIndex
);
}
if
(
int
.
class
==
type
)
{
return
getCurrentResultSet
().
getInt
(
columnIndex
);
}
if
(
long
.
class
==
type
)
{
return
getCurrentResultSet
().
getLong
(
columnIndex
);
}
if
(
float
.
class
==
type
)
{
return
getCurrentResultSet
().
getFloat
(
columnIndex
);
}
if
(
double
.
class
==
type
)
{
return
getCurrentResultSet
().
getDouble
(
columnIndex
);
}
if
(
String
.
class
==
type
)
{
return
getCurrentResultSet
().
getString
(
columnIndex
);
}
if
(
BigDecimal
.
class
==
type
)
{
return
getCurrentResultSet
().
getBigDecimal
(
columnIndex
);
}
if
(
byte
[].
class
==
type
)
{
return
getCurrentResultSet
().
getBytes
(
columnIndex
);
}
if
(
Date
.
class
==
type
)
{
return
getCurrentResultSet
().
getDate
(
columnIndex
);
}
if
(
Time
.
class
==
type
)
{
return
getCurrentResultSet
().
getTime
(
columnIndex
);
}
if
(
Timestamp
.
class
==
type
)
{
return
getCurrentResultSet
().
getTimestamp
(
columnIndex
);
}
if
(
URL
.
class
==
type
)
{
return
getCurrentResultSet
().
getURL
(
columnIndex
);
}
if
(
Blob
.
class
==
type
)
{
return
getCurrentResultSet
().
getBlob
(
columnIndex
);
}
if
(
Clob
.
class
==
type
)
{
return
getCurrentResultSet
().
getClob
(
columnIndex
);
}
if
(
SQLXML
.
class
==
type
)
{
return
getCurrentResultSet
().
getSQLXML
(
columnIndex
);
}
if
(
Reader
.
class
==
type
)
{
return
getCurrentResultSet
().
getCharacterStream
(
columnIndex
);
}
return
getCurrentResultSet
().
getObject
(
columnIndex
);
result
=
getCurrentResultSet
().
getObject
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
boolean
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getBoolean
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
byte
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getByte
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
short
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getShort
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
int
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getInt
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
long
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getLong
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
float
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getFloat
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
double
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getDouble
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
String
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getString
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
BigDecimal
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getBigDecimal
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
byte
[].
class
==
type
)
{
result
=
getCurrentResultSet
().
getBytes
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
Date
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getDate
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
Time
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTime
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
Timestamp
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTimestamp
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
URL
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getURL
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
Blob
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getBlob
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
Clob
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getClob
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
SQLXML
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getSQLXML
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
if
(
Reader
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getCharacterStream
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
return
result
;
}
else
{
result
=
getCurrentResultSet
().
getObject
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
return
result
;
}
@Override
public
Object
getValue
(
final
String
columnLabel
,
final
Class
<?>
type
)
throws
SQLException
{
Object
result
;
if
(
Object
.
class
==
type
)
{
return
getCurrentResultSet
().
getObject
(
columnLabel
);
}
if
(
boolean
.
class
==
type
)
{
return
getCurrentResultSet
().
getBoolean
(
columnLabel
);
}
if
(
byte
.
class
==
type
)
{
return
getCurrentResultSet
().
getByte
(
columnLabel
);
}
if
(
short
.
class
==
type
)
{
return
getCurrentResultSet
().
getShort
(
columnLabel
);
}
if
(
int
.
class
==
type
)
{
return
getCurrentResultSet
().
getInt
(
columnLabel
);
}
if
(
long
.
class
==
type
)
{
return
getCurrentResultSet
().
getLong
(
columnLabel
);
}
if
(
float
.
class
==
type
)
{
return
getCurrentResultSet
().
getFloat
(
columnLabel
);
}
if
(
double
.
class
==
type
)
{
return
getCurrentResultSet
().
getDouble
(
columnLabel
);
}
if
(
String
.
class
==
type
)
{
return
getCurrentResultSet
().
getString
(
columnLabel
);
}
if
(
BigDecimal
.
class
==
type
)
{
return
getCurrentResultSet
().
getBigDecimal
(
columnLabel
);
}
if
(
byte
[].
class
==
type
)
{
return
getCurrentResultSet
().
getBytes
(
columnLabel
);
}
if
(
Date
.
class
==
type
)
{
return
getCurrentResultSet
().
getDate
(
columnLabel
);
}
if
(
Time
.
class
==
type
)
{
return
getCurrentResultSet
().
getTime
(
columnLabel
);
}
if
(
Timestamp
.
class
==
type
)
{
return
getCurrentResultSet
().
getTimestamp
(
columnLabel
);
}
if
(
URL
.
class
==
type
)
{
return
getCurrentResultSet
().
getURL
(
columnLabel
);
}
if
(
Blob
.
class
==
type
)
{
return
getCurrentResultSet
().
getBlob
(
columnLabel
);
}
if
(
Clob
.
class
==
type
)
{
return
getCurrentResultSet
().
getClob
(
columnLabel
);
}
if
(
SQLXML
.
class
==
type
)
{
return
getCurrentResultSet
().
getSQLXML
(
columnLabel
);
}
if
(
Reader
.
class
==
type
)
{
return
getCurrentResultSet
().
getCharacterStream
(
columnLabel
);
}
return
getCurrentResultSet
().
getObject
(
columnLabel
);
result
=
getCurrentResultSet
().
getObject
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
boolean
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getBoolean
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
byte
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getByte
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
short
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getShort
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
int
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getInt
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
long
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getLong
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
float
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getFloat
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
double
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getDouble
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
String
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getString
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
BigDecimal
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getBigDecimal
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
byte
[].
class
==
type
)
{
result
=
getCurrentResultSet
().
getBytes
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Date
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getDate
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Time
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTime
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Timestamp
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTimestamp
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
URL
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getURL
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Blob
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getBlob
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Clob
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getClob
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
SQLXML
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getSQLXML
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Reader
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getCharacterStream
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
{
result
=
getCurrentResultSet
().
getObject
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
return
result
;
}
@Override
public
Object
getCalendarValue
(
final
int
columnIndex
,
final
Class
<?>
type
,
final
Calendar
calendar
)
throws
SQLException
{
Object
result
;
if
(
Date
.
class
==
type
)
{
return
getCurrentResultSet
().
getDate
(
columnIndex
,
calendar
);
}
if
(
Time
.
class
==
type
)
{
return
getCurrentResultSet
().
getTime
(
columnIndex
,
calendar
);
}
if
(
Timestamp
.
class
==
type
)
{
return
getCurrentResultSet
().
getTimestamp
(
columnIndex
,
calendar
);
}
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
result
=
getCurrentResultSet
().
getDate
(
columnIndex
,
calendar
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Time
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTime
(
columnIndex
,
calendar
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Timestamp
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTimestamp
(
columnIndex
,
calendar
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
{
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
}
return
result
;
}
@Override
public
Object
getCalendarValue
(
final
String
columnLabel
,
final
Class
<?>
type
,
final
Calendar
calendar
)
throws
SQLException
{
Object
result
;
if
(
Date
.
class
==
type
)
{
return
getCurrentResultSet
().
getDate
(
columnLabel
,
calendar
);
}
if
(
Time
.
class
==
type
)
{
return
getCurrentResultSet
().
getTime
(
columnLabel
,
calendar
);
}
if
(
Timestamp
.
class
==
type
)
{
return
getCurrentResultSet
().
getTimestamp
(
columnLabel
,
calendar
);
}
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
result
=
getCurrentResultSet
().
getDate
(
columnLabel
,
calendar
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Time
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTime
(
columnLabel
,
calendar
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
Timestamp
.
class
==
type
)
{
result
=
getCurrentResultSet
().
getTimestamp
(
columnLabel
,
calendar
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
{
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
}
return
result
;
}
@SuppressWarnings
(
"deprecation"
)
@Override
public
InputStream
getInputStream
(
final
int
columnIndex
,
final
String
type
)
throws
SQLException
{
InputStream
result
;
if
(
"Ascii"
.
equals
(
type
))
{
return
getCurrentResultSet
().
getAsciiStream
(
columnIndex
);
}
if
(
"Unicode"
.
equals
(
type
))
{
return
getCurrentResultSet
().
getUnicodeStream
(
columnIndex
);
}
if
(
"Binary"
.
equals
(
type
))
{
return
getCurrentResultSet
().
getBinaryStream
(
columnIndex
);
}
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
result
=
getCurrentResultSet
().
getAsciiStream
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
"Unicode"
.
equals
(
type
))
{
result
=
getCurrentResultSet
().
getUnicodeStream
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
"Binary"
.
equals
(
type
))
{
result
=
getCurrentResultSet
().
getBinaryStream
(
columnIndex
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
{
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
}
return
result
;
}
@SuppressWarnings
(
"deprecation"
)
@Override
public
InputStream
getInputStream
(
final
String
columnLabel
,
final
String
type
)
throws
SQLException
{
InputStream
result
;
if
(
"Ascii"
.
equals
(
type
))
{
return
getCurrentResultSet
().
getAsciiStream
(
columnLabel
);
}
if
(
"Unicode"
.
equals
(
type
))
{
return
getCurrentResultSet
().
getUnicodeStream
(
columnLabel
);
}
if
(
"Binary"
.
equals
(
type
))
{
return
getCurrentResultSet
().
getBinaryStream
(
columnLabel
);
}
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
result
=
getCurrentResultSet
().
getAsciiStream
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
"Unicode"
.
equals
(
type
))
{
result
=
getCurrentResultSet
().
getUnicodeStream
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
if
(
"Binary"
.
equals
(
type
))
{
result
=
getCurrentResultSet
().
getBinaryStream
(
columnLabel
);
wasNull
=
getCurrentResultSet
().
wasNull
();
}
else
{
throw
new
SQLException
(
String
.
format
(
"Unsupported type: %s"
,
type
));
}
return
result
;
}
@Override
public
boolean
wasNull
()
throws
SQLException
{
return
wasNull
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录