Get the affinity of a SQLite column on Android

Posted by Neil Traft on Stack Overflow See other posts from Stack Overflow or by Neil Traft
Published on 2011-01-13T21:11:49Z Indexed on 2011/01/14 0:54 UTC
Read the original article Hit count: 202

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about android

Related posts about sqlite