关于" _id"在Android的SQLite的领域领域、_id、QUOT、SQLite

由网友(流晞)分享简介:是场_id必要的,Android的SQLite的?Is the field "_id" necessary in Android SQLite?推荐答案_id当您使用增强型适配器这使得使用游标(如ResourceCursorAdapter)是很有用的。它的使用由这些适配器,以提供可被用来指特定的行中涉及的在任何适配...

是场_id必要的,Android的SQLite的?

Is the field "_id" necessary in Android SQLite?

推荐答案

_id当您使用增强型适配器这使得使用游标(如ResourceCursorAdapter)是很有用的。它的使用由这些适配器,以提供可被用来指特定的行中涉及的在任何适配器被用于(例如一排在ListView)的项目表的ID。

_id is useful when you are using the enhanced Adapters which make use of a Cursor (e.g. ResourceCursorAdapter). It's used by these adapters to provide an ID which can be used to refer to the specific row in the table which relates the the item in whatever the adapter is being used for (e.g. a row in a ListView).

这是,如果你不打算使用它需要一个_id列在游标类没有必要的,而且你还可以使用作为_id做好像它被称为_id在你的光标另一列出现。

It's not necessary if you're not going to be using classes which need an _id column in a cursor, and you can also use "as _id" to make another column appear as though it's called _id in your cursor.

阅读全文

相关推荐

最新文章