createDatabase
inline fun <db : RoomDatabase> createDatabase(context: Context, databaseName: String, passPhrase: String, fallbackMigration: Boolean = false, useMemoryProtection: Boolean = false, migrationList: List<Migration>? = null): db
Function to build an instance of db, that inherit RoomDatabase
Return
instance of db
Parameters
db
RoomDatabase class that to build
context
Context of current application
databaseName
String of name for the RoomDatabase
passPhrase
String of pass phrase to encrypt the database
fallbackMigration
Boolean define does the database should fall back when there's new version?
useMemoryProtection
Boolean define does the database will use memory protection, you can disable it to improve performance
migrationList
List of Migration of RoomDatabase for each new versions