Open
Description
The result returned from DatabaseMetadata#getTypeInfo()
is a very small (useless) subset of the SQL types sqlite provides.
- Run the following on any database:
ResultSet rs = dbMetaData.getTypeInfo();
while (rs.next())
out.println(rs.getString("TYPE_NAME") + "\t" + JDBCType.valueOf(rs.getInt("DATA_TYPE")).getName());
- Result:
BLOB BLOB
INTEGER INTEGER
NULL NULL
REAL REAL
TEXT VARCHAR
- As you can see, these mappings only cover a small fraction of the available sqlite SQL types. I was hoping to use this to overcome DatabaseMetaData#getColumns() returns conflicting results for ResultSet#getInt("DATA_TYPE") and ResultSet#getString("TYPE_NAME") #935.
- Given all the shortcuts taken in this driver wrt type-safety, one has to conclude the implementers don't consider type-safety a worthwhile aspect. If that is the case, please let me know so I can account for that in my project (and stop filing issues here). Thanks.