Verified
Status Update
Comments
m6...@mschmitt.info <m6...@mschmitt.info> #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.
yb...@google.com <yb...@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.
m6...@mschmitt.info <m6...@mschmitt.info> #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?
yb...@google.com <yb...@google.com> #5
I was looking for something like deleteDatabase in the documentation and could not find it. That would be perfect for me. I don't care about auto-increment ids resetting or not, but lets wait for the original poster to tell his/her wishes.
Description
Version used: 1.0.0-alpha1
Devices/Android versions reproduced on: n/a
Just discovered that you also support abstract classes for DAOs, which is great! Any chance you implement transaction handling the way JDBI does? (JDBI doesn't do code generation, so not directly comparable)
The generated code could override an @Transaction annotated DAO method and wrap it in a transaction.