I think this code snippet attempts to map the schema.xml types to database 
types.  

If your database is indeed sending this as a LONGVARCHAR, I would expect a 
default "resultset.getString(index)" to correctly get text from a LONGVARCHAR 
column.

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: geeky2 [mailto:gee...@hotmail.com] 
Sent: Tuesday, May 21, 2013 9:09 AM
To: dev@lucene.apache.org
Subject: RE: have developer question about ClobTransformer and DIH

>>
Since i don't see Types.LONGVARCHAR mentioned anywhere in the DIH code
base, i suspect it's falling back to some default behavior assuming
String data which doesn't account for the way LONGVARCHAR data is
probably returned as an Object that needs to be streamed similar to a
Clob. 
<<

could this be the default behaviour?

   for (Map<String, String> map : context.getAllEntityFields()) {
      String n = map.get(DataImporter.COLUMN);
      String t = map.get(DataImporter.TYPE);
      if ("sint".equals(t) || "integer".equals(t))
        fieldNameVsType.put(n, Types.INTEGER);
      else if ("slong".equals(t) || "long".equals(t))
        fieldNameVsType.put(n, Types.BIGINT);
      else if ("float".equals(t) || "sfloat".equals(t))
        fieldNameVsType.put(n, Types.FLOAT);
      else if ("double".equals(t) || "sdouble".equals(t))
        fieldNameVsType.put(n, Types.DOUBLE);
      else if ("date".equals(t))
        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);*
    }




--
View this message in context: 
http://lucene.472066.n3.nabble.com/have-developer-question-about-ClobTransformer-and-DIH-tp4064256p4064916.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to