Skip to content

Commit

Permalink
write the sqlite3 function to only switch on VARBINARY/LONGVARBINARY …
Browse files Browse the repository at this point in the history
…and otherwise call super.jdbcToRuby
  • Loading branch information
jdmorani committed Sep 14, 2011
1 parent 61dab56 commit eaea873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Binary file modified lib/arjdbc/jdbc/adapter_java.jar
Binary file not shown.
16 changes: 2 additions & 14 deletions src/java/arjdbc/sqlite3/Sqlite3RubyJdbcConnection.java
Expand Up @@ -82,21 +82,9 @@ protected IRubyObject jdbcToRuby(Ruby runtime, int column, int type, ResultSet r
case Types.LONGVARCHAR:
return runtime.is1_9() ?
readerToRuby(runtime, resultSet, resultSet.getCharacterStream(column)) :
streamToRuby(runtime, resultSet, new ByteArrayInputStream(resultSet.getBytes(column)));
case Types.CLOB:
return readerToRuby(runtime, resultSet, resultSet.getCharacterStream(column));
case Types.TIMESTAMP:
return timestampToRuby(runtime, resultSet, resultSet.getTimestamp(column));
case Types.INTEGER:
case Types.SMALLINT:
case Types.TINYINT:
return integerToRuby(runtime, resultSet, resultSet.getLong(column));
case Types.REAL:
return doubleToRuby(runtime, resultSet, resultSet.getDouble(column));
case Types.BIGINT:
return bigIntegerToRuby(runtime, resultSet, resultSet.getString(column));
streamToRuby(runtime, resultSet, new ByteArrayInputStream(resultSet.getBytes(column)));
default:
return stringToRuby(runtime, resultSet, resultSet.getString(column));
return super.jdbcToRuby(runtime, column, type, resultSet);
}
} catch (IOException ioe) {
throw (SQLException) new SQLException(ioe.getMessage()).initCause(ioe);
Expand Down

0 comments on commit eaea873

Please sign in to comment.