Search code examples
androidsqlitekotlinandroid-room

How to make the data visible in DB


I use Room for work with database. When I save data to the database, they are saved to the .db-wal file and not to the database.

How can I make me see the data visible in the database?

When I fill the db, I see that volume of wal file is increasing but bd - not =(. And I'd like to see data to have controll which data is saved.

enter image description here

enter image description here

Here is an example to project I used https://github.com/googlecodelabs/android-room-with-a-view/tree/kotlin


Solution

  • Wal is a temporary db file, just copy all 3 files. If you want to merge data in the .db you need to perform a checkpoint, or disable wal.

    Check this: Android: SQLite database created with room shows no tables when opening with sqlte-browser