Determining column type, integer or long?
843859May 31 2010 — edited Nov 20 2014I'm reading somebody's SQLite database and when I call getColumnType on ResultSetMetaData
I am getting 4 (integer) for types that I know are 64 bit longs (which should be BIGINT -5 right?).
At first I guessed it was the jdbc driver, but even when I use the sqlite3.exe tool to check the schema it just says INTEGER.
The code seems to work whether I call getInt or getLong (though obviously getInt returns the wrong
truncated values). Is it safe to call getLong regardless of the integer size? Will it screw up 32 bit
integer types? So far, it appears to handle getLong for 32 bits types just fine.
Thanks!