|
1
348
它是:
|
|
2
45
SQLite中没有bool数据类型。使用您修正为0或1的int来达到这个效果。见 datatypes reference 在 SQLite 3.0 |
|
|
3
22
|
|
|
4
10
这里的大多数答案可能会导致NumberFormatExceptions或“operator is undefined for the types null,int”,如果允许您存储int的列也包含null。 做这件事的好方法是
尽管现在只能存储字符串“true”和“false”,而不是0或1。 |
|
5
6
Ormlite Cursor 同时检查空值,而其他答案都不检查空值。
|
|
6
6
你也可以使用
|
|
7
3
另一种选择
|
|
8
3
你会得到一个结果
你可以使用
|
|
|
9
2
布尔b=(cursor.getInt(cursor.getColumnIndex(“item”))!=0); |
|
|
10
0
很简单:
|