[OJB-developers] Patch for BLOB/CLOB support
Brought to you by:
thma
From: Florian B. <bf...@fl...> - 2002-02-07 11:35:28
|
Hi, the following changes were necessary to support BLOB/CLOB type columns. I tested it with Informix IIF 2000 with version 2.21JC2 of the JDBC driver. Concerning a JUnit test for it - I'm looking into it, but HSQLDB doesn't seem to support BLOB/CLOB, so I am quite unsure how I could provide a test. best regards, Florian Changes against 0.7.327 JdbcAccess.java, starting at line 571: break; } case Types.CLOB: { java.sql.Clob aClob = rs.getClob(columnId); result = aClob.getSubString(0L, (int)aClob.length()); break; } case Types.BLOB: { java.sql.Blob aBlob = rs.getBlob(columnId); result = aBlob.getBytes(0L, (int)aBlob.length()); break; } default: { JdbcAccess.java around line 637: else if (type.equals("longvarbinary")) result = Types.LONGVARBINARY; else if (type.equals("clob")) result = Types.CLOB; else if (type.equals("blob")) result = Types.BLOB; else StatementManager.java line 266: if (val != null) stmt.setObject(i + 1, val, JdbcAccess.getSqlTypeAll(cld, i)); else stmt.setNull(i + 1, JdbcAccess.getSqlTypeAll(cld, i)); |