Chris,

I'm basing my opinion here on this statement,

"The method ResultSet.getString, which allocates and returns a new String 
object, is recommended for retrieving data from CHAR, VARCHAR, and LONGVARCHAR 
fields."

from section 9.3.1 of this document:

http://docs.oracle.com/javase/1.4.2/docs/guide/jdbc/getstart/mapping.html

I realize this is from 1.4.2 but I could not find a newer version of this 
document.  I would not expect (blindly this time) it to have changed in a 
backwards-incompatible way.  In the end, of course, it really depends on 
however a particular jdbc driver's implementation.  If an obscure database's 
jdbc driver--after the user did a funny workaround to get some other tool to 
work--is returning bytes or hex addresses or whatever, but if you can solve it 
with a cast...why would we want to modify our code to make this particular case 
work more smoothly?

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: Chris Hostetter [mailto:hossman_luc...@fucit.org] 
Sent: Tuesday, May 21, 2013 10:28 AM
To: dev@lucene.apache.org
Subject: RE: have developer question about ClobTransformer and DIH


: 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: how certain is your expecation?

Based on the sparse mentions of LONGVARCHAR in the ResultSet class docs, 
i'm not convinced getString() will do the right thing....

http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getAsciiStream%28int%29


-Hoss

---------------------------------------------------------------------
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