mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
support spring Jdbc4NativeJdbcExtractor
This commit is contained in:
@@ -33,6 +33,8 @@ import java.sql.SQLXML;
|
||||
import java.sql.Statement;
|
||||
import java.util.Calendar;
|
||||
|
||||
import com.alibaba.druid.proxy.jdbc.ResultSetProxy;
|
||||
|
||||
/**
|
||||
* @author wenshao<szujobs@hotmail.com>
|
||||
*/
|
||||
@@ -1766,4 +1768,17 @@ public final class DruidPooledResultSet extends PoolableWrapper implements Resul
|
||||
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
if (iface == ResultSet.class) {
|
||||
if (rs instanceof ResultSetProxy) {
|
||||
return rs.unwrap(iface);
|
||||
}
|
||||
|
||||
return (T) rs;
|
||||
}
|
||||
|
||||
return super.unwrap(iface);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user