Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
We gave up upgrading to Room because we need to use FTS3/FTS4 virtual tables. Any plants to support it?
[Deleted User] <[Deleted User]> #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.
yb...@google.com <yb...@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
[Deleted User] <[Deleted User]> #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.
yb...@google.com <yb...@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: N/A
In current version of room if I mark method in DAO with @Transaction, and if it uses any disposable e.g. Single, the generated code will throw main thread access exception at runtime.
I would expect one of two behaviours instead:
1. It would be ideal if room could somehow defer start/end transaction to match thread that is used on Disposable, but I can imagine that this can be not possible.
2. To get compile time warning or error that this may be not the correct way of using @Transaction with mix of asynchronous code.
Example of code:
Method in abstract DAO:
@Transaction
open fun upsert(obj: T): Single<Boolean> {
return insert(obj)
.map { true }
.onErrorResumeNext {
if (it is SQLiteConstraintException)
{ update(obj)
.map { true }
} else {
Single.error(it) }
}
.subscribeOn(Schedulers.io()) }
Generated method:
@Override
public Single<Boolean> upsert(Supplier obj) {
__db.beginTransaction();
try {
Single<Boolean> _result = super.upsert(obj);
__db.setTransactionSuccessful();
return _result;
} finally {
__db.endTransaction();
}
}