Verified
Status Update
Comments
cc...@google.com <cc...@google.com> #2
do you want to drop all tables or truncate all tables?
i think we can generate a method that does that in RoomDatabase.
i think we can generate a method that does that in RoomDatabase.
cc...@google.com <cc...@google.com> #3
I was also looking for this and could not find it. For me it would be ideal if it could drop the whole database. So when the user logs out everything is cleared and the new database is then created on a new log in - the same as if running the application for the first time.
cc...@google.com <cc...@google.com> #4
you can consider closing and then deleting the database. (context.deleteDatabase).
The only difference vs truncating would be the auto-increment ids would be reset. Is it that important?
The only difference vs truncating would be the auto-increment ids would be reset. Is it that important?
Description
Version used:
room = "1.1.0-alpha3"
paging = "1.0.0-alpha6"
Lets say i have a dao method with joined tables in the query:
@Query("SELECT * from t1 left join t2")
public abstract DataSource.Factory<Integer, ProjectionModel> getAll();
The following code gets generated by room:
return new LimitOffsetDataSource<ProjectionModel>(__db, _statement, false ,"t1", ,"t2")
There is multiple commas between the observed tables. With only 1 table in the query the code generates correctly.
Previous version(1.1.0-alpha2) also generates code correctly.