When Will We Use This?
There are two broad categories of scenarios where the support database API comes into play.
First is when you want to use a different SQLite implementation, such as wanting to use SQLCipher for Android. Then, as part of setting up your RoomDatabase
, you can provide it with the details of how to use that SQLite implementation, and Room will (hopefully) work with it.
However, there are other places in the Room API where the Room abstractions break down and the support database API peeks through, such as:
- When you need to migrate a database from one schema to another
- When you need to create and manage tables that Room will not use
- When you need to configure your database in ways beyond what Room supports, such as directly invoking
PRAGMA
statements
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.