Indentifying datatype of a column in an SQLite Android Cursor
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there any way to identify the datatype of a column in a cursor in Android. The cursor object has a number of methods to get the columnname, column value. I want to find out the SQLite datatype of the column (TEXT, INTEGER) etc... I'm writing a generic function to parse a cursor and perform operations. I will only get a sql string as an argument to the function. 回答1: Per the SQLite documentation ( http://www.sqlite.org/datatype3.html ) columns in SQLite don't have a datatype -- the values in those columns do. Any column in an SQLite