build Database

inline fun <T : RoomDatabase> buildDatabase(    ctx: Context,     dbName: String,     passPhrase: String,     fallBackMigration: Boolean = false,     migrations: List<Migration>? = null): T

Method to build encrypted Room Database

Author

Jimly A.

Since

26-May-21

Return

object of T that inherit RoomDatabase class

Parameters

T

app's database that inherit Room Database

ctx

context where the database is

dbName

name of the database

passPhrase

used for database encryption

fallBackMigration

clear the database when there's new version? default false

migrations

list of migrations for for older version, default null

Sources

Link copied to clipboard