只是在想,我怎么能获得在Android的SQLite数据库的布尔字段的值?
was just wondering, how can I obtain the value of a boolean field in a sqlite database in android?
我通常使用的getString()
调用getInt()
等,以获得我的字段的值,但有不似乎不是一个 getBoolean()
方法。
I usually use getString()
getInt()
etc to get the values of my fields, but there does not seem to be a getBoolean()
method.
任何考生?
如果没记错的话:
boolean value = cursor.getInt(boolean_column_index)>0;