获取SQLite FTS3表的行ID

jak*_*ake 16 android fts3 android-sqlite

我创建了一个我在Android开发平台中使用的SQLite FTS3表(target2.2并且minVersion是8).例如,我创建了如下表:

create virtual table person using fts3(first,last);
Run Code Online (Sandbox Code Playgroud)

我知道当我将数据插入此表时,我long将返回,这是插入的记录的行ID.如何从此表中获取行ID?如果我执行:

select * from person
Run Code Online (Sandbox Code Playgroud)

我得到-1Cursor.getColumnColumnIndex("rowid");.此外,Cursor.getColumnNames()仅显示两列('first'和'last')而不是'rowid'.关于如何解决这个问题的任何建议?

com*_*ral 38

尝试使用:

select rowid,* from person
Run Code Online (Sandbox Code Playgroud)

Rowid是一个隐藏字段,不包含在"*"中.