Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
ya...@google.com <ya...@google.com>
ya...@google.com <ya...@google.com> #2
We gave up upgrading to Room because we need to use FTS3/FTS4 virtual tables. Any plants to support it?
gm...@gmail.com <gm...@gmail.com> #3
Florina Muntenescu (Android developer advocate at Google) told me that FTS support will definitely NOT be in Room 1.0 final. It is postponed to an indeterminate later version.
ya...@google.com <ya...@google.com> #4
It is possible to work with virtual tables and fts4 while using Room v1. You just need to create and access it by yourself using sql queries. Not perfect but it works for me (just did it a few days ago).
Can't wait for this feature to be in Room
Can't wait for this feature to be in Room
gm...@gmail.com <gm...@gmail.com> #5
If your FTS tables are separate from the rest of your model it's a viable solution. Mine are fully integrated with my model (almost all queries have JOINs with virtual tables) so it's a no-go.
ya...@google.com <ya...@google.com> #6
any news?
ap...@google.com <ap...@google.com> #7
I'm really looking forward to use FTS natively with Room. Can you give some kind of roadmap? E.g. is it considered for Room 1.2 or Room 2.0?
Description
Version used: 2.0.0
Devices/Android versions reproduced on: Wileyfox Swift (API 25)
Not reproduced on Android Emulator API 15 (probably due to different SQLite version).
SQLite constraint violation on method annotated with @Insert(onConflict = OnConflictStrategy.ROLLBACK) causes SQLiteException instead of SQLiteConstraintException.
Stack trace example:
E/AndroidRuntime: FATAL EXCEPTION: Thread-8
Process: gmk57.roomtest, PID: 2152
android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:439)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:524)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction(FrameworkSQLiteDatabase.java:90)
at androidx.room.RoomDatabase.endTransaction(RoomDatabase.java:266)
at gmk57.roomtest.DataDao_Impl.insertRollback(DataDao_Impl.java:99)
at gmk57.roomtest.MainActivity.violateRollback(MainActivity.java:67)
Taking into account that
1) Room wraps methods annotated with @Insert, @Update and @Transaction in explicit transaction, and
2) ABORT, FAIL and ROLLBACK all throw SQLiteConstraintException, effectively rolling back this transaction
- the broader question is: is there any reason to provide FAIL and ROLLBACK options at all?
I also think the documentation should clearly describe the behavior of each strategy in specific case of Android + Room (e.g. which strategies throw an exception and which do not), instead of just linking to partly irrelevant SQLite documentation.
Sample project attached.