SQLite的"没有ROWID"支持Android上的SQLite的?
我有一个SQLite的应用程序,使用SQLite的编译自定义(使用NDK)时,在Linux,Windows的Android版也能正常工作。创建与无ROWID正常工作表。
I have a SQLite application that works fine on Linux, Windows an also Android when using a custom compiled SQLite (using the NDK). Creating tables with and without ROWID works properly.
在相反的,当我尝试使用Android的标准SQLite的语法错误被抛出近没有在未来的SQL语句来创建相同的模式:
On the opposite, when I try to create the same schema using the standard SQLite in Android a syntax error is thrown near "WITHOUT" in the next SQL sentence:
CREATE TABLE REL_TABLE1_TABLE2
( FK_TABLE1_ID integer, FK_TABLE2_ID integer,
FOREIGN KEY (FK_TABLE1_ID) REFERENCES TABLE1(ROWID),
FOREIGN KEY (FK_TABLE2_ID) REFERENCES TABLE2(ROWID),
PRIMARY KEY (FK_TABLE1_ID, FK_TABLE2_ID)
)
WITHOUT ROWID;
如果我删除了没有ROWID它工作正常。这是否意味着没有任何ROWID不支持在Android?
If I remove the "WITHOUT ROWID" it works properly. Does it mean WITHOUT ROWID is not supported on Android?.
我没有发现任何相关的文件,但其他人似乎已经相关的问题:
I found no related documentation but someone else looks to have related problems:
Cannot开放源码数据库linqpad,当不带ROWID使用
编辑:TABLE1 / 2仍然保持ROWID。无ROWID仅适用于N / M REL_TABLE1_TABLE2表
edit: TABLE1/2 still keep the ROWID. WITHOUT ROWID applies only to the N/M REL_TABLE1_TABLE2 table
无ROWID SQLite中介绍3.8.2 。
WITHOUT ROWID was introduced in SQLite 3.8.2.
这意味着它可能会,也可能不支持在Android上,这取决于的Android您正在使用的版本。
This means that it might or might not be supported on Android, depending on which Android version you're using.