我找到了一个使用MATCH关键字的不错的查询,但它需要 fts4。所以,我正在尝试使用 fts4 创建一个表,如下所示,
static {
mCreateEntries.add("CREATE TABLE " + Tables.LOCATION_DETAILS
+ " USING fts4(" + ConfigContract.LocationDetails.LOCATION_ID
+ " INTEGER NOT NULL,"
+ ConfigContract.LocationDetails.LANGUAGE_ID
+ " INTEGER NOT NULL,"
+ ConfigContract.LocationDetails.LOCATION_NAME
+ " TEXT NOT NULL" + ")");
}
但是,我得到以下异常,
java.lang.RuntimeException: Unable to get provider com.sample.database.Provider: android.database.sqlite.SQLiteException: near "USING": syntax error (code 1): , while compiling: CREATE TABLE location_details USING fts4(location_id INTEGER NOT NULL,language_id INTEGER NOT NULL,location_name TEXT NOT NULL)
我做错什么了吗?请给我建议,
提前致谢。