Author: jolee
Date: 2013-10-30 15:34:17 -0400 (Wed, 30 Oct 2013)
New Revision: 4608
Modified:
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/BaseDB2ExecutionFactory.java
Log:
TEIID-2704: DB2 lob values must be read inline (including CLOB + BLOB)
Modified:
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/BaseDB2ExecutionFactory.java
===================================================================
---
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/BaseDB2ExecutionFactory.java 2013-10-30
14:48:09 UTC (rev 4607)
+++
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/BaseDB2ExecutionFactory.java 2013-10-30
19:34:17 UTC (rev 4608)
@@ -184,8 +184,10 @@
@Override
public Object retrieveValue(ResultSet results, int columnIndex,
Class<?> expectedType) throws SQLException {
- if (expectedType == TypeFacility.RUNTIME_TYPES.XML) {
+ if (expectedType == TypeFacility.RUNTIME_TYPES.XML || expectedType ==
TypeFacility.RUNTIME_TYPES.CLOB) {
return results.getString(columnIndex);
+ } else if (expectedType == TypeFacility.RUNTIME_TYPES.BLOB ){
+ return results.getBytes(columnIndex);
}
return super.retrieveValue(results, columnIndex, expectedType);
}
@@ -193,8 +195,10 @@
@Override
public Object retrieveValue(CallableStatement results, int parameterIndex,
Class<?> expectedType) throws SQLException {
- if (expectedType == TypeFacility.RUNTIME_TYPES.XML) {
+ if (expectedType == TypeFacility.RUNTIME_TYPES.XML || expectedType ==
TypeFacility.RUNTIME_TYPES.CLOB) {
return results.getString(parameterIndex);
+ } else if (expectedType == TypeFacility.RUNTIME_TYPES.BLOB){
+ return results.getBytes(parameterIndex);
}
return super.retrieveValue(results, parameterIndex, expectedType);
}
Show replies by date