RoomDatabaseConfig
data class RoomDatabaseConfig(val openHelperFactory: SupportSQLiteOpenHelper.Factory? = null, val enableMultiInstanceInvalidation: Boolean = false, val journalMode: RoomDatabase.JournalMode? = null, val callbacks: List<RoomDatabase.Callback> = emptyList(), val fallbackToDestructiveMigration: Boolean = false, val fallbackToDestructiveMigrationFromVersion: List<Int> = emptyList(), val migrations: List<Migration> = emptyList(), val executor: DatabaseExecutor = DatabaseExecutor.Default)
Configuration options for building a Room database
Constructors
Link copied to clipboard
constructor(openHelperFactory: SupportSQLiteOpenHelper.Factory? = null, enableMultiInstanceInvalidation: Boolean = false, journalMode: RoomDatabase.JournalMode? = null, callbacks: List<RoomDatabase.Callback> = emptyList(), fallbackToDestructiveMigration: Boolean = false, fallbackToDestructiveMigrationFromVersion: List<Int> = emptyList(), migrations: List<Migration> = emptyList(), executor: DatabaseExecutor = DatabaseExecutor.Default)
Properties
Link copied to clipboard
List of database callbacks to be added. Empty list by default.
Link copied to clipboard
Whether to enable multi-instance invalidation. False by default.
Link copied to clipboard
Link copied to clipboard
If true, the database will be recreated if a migration is not found. False by default.
Link copied to clipboard
List of versions to fallback to destructive migration from. Empty list by default.
Link copied to clipboard
The journal mode to use for the database. Null by default.
Link copied to clipboard
List of migrations to apply to the database. Empty list by default.
Link copied to clipboard
Custom SQLite open helper factory (e.g., for encryption). Null by default.