SOLR-1348 -- Support binary field type in convertType logic in JdbcDataSource

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@812045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2009-09-07 09:01:10 +00:00
parent abf5aa685c
commit c8d2431548
2 changed files with 9 additions and 1 deletions

View File

@ -150,7 +150,10 @@ New Features
35.SOLR-1235: disallow period (.) in entity names (noble)
36.SOLR-1234: Multiple DIH does not work because all of them write to dataimport.properties. Use the handler name as the properties file name (noble)
36.SOLR-1234: Multiple DIH does not work because all of them write to dataimport.properties.
Use the handler name as the properties file name (noble)
37.SOLR-1348: Support binary field type in convertType logic in JdbcDataSource (shalin)
Optimizations
----------------------

View File

@ -89,6 +89,8 @@ public class JdbcDataSource extends
fieldNameVsType.put(n, Types.DATE);
else if ("boolean".equals(t))
fieldNameVsType.put(n, Types.BOOLEAN);
else if ("binary".equals(t))
fieldNameVsType.put(n, Types.BLOB);
else
fieldNameVsType.put(n, Types.VARCHAR);
}
@ -307,6 +309,9 @@ public class JdbcDataSource extends
case Types.BOOLEAN:
result.put(colName, resultSet.getBoolean(colName));
break;
case Types.BLOB:
result.put(colName, resultSet.getBytes(colName));
break;
default:
result.put(colName, resultSet.getString(colName));
break;