Get the affinity of a SQLite column on Android
- by Neil Traft
The SQLite C library has a method, sqlite3_column_decltype(). But I cannot find any place where the Android SQLite API makes this method available. Is there any way to get the declared type of a column without running any SQL (i.e. can I avoid using PRAGMA table_info)?
I could have used AbstractWindowedCursor.isBlob(), but it says that it will also return true if the field is NULL. I need something that will guarantee me a value equal to the column's declared type.