Callback
abstract class Callback
kotlin.Any | |
↳ | androidx.room.RoomDatabase.Callback |
Callback for RoomDatabase
.
Summary
Public constructors | |
---|---|
<init>() Callback for |
Public methods | |
---|---|
open Unit |
onCreate(@NonNull db: SupportSQLiteDatabase) Called when the database is created for the first time. |
open Unit |
onDestructiveMigration(@NonNull db: SupportSQLiteDatabase) Called after the database was destructively migrated |
open Unit |
onOpen(@NonNull db: SupportSQLiteDatabase) Called when the database has been opened. |
Public constructors
Public methods
onCreate
open fun onCreate(@NonNull db: SupportSQLiteDatabase): Unit
Called when the database is created for the first time. This is called after all the tables are created.
Parameters | |
---|---|
db |
SupportSQLiteDatabase: The database. |
onDestructiveMigration
open fun onDestructiveMigration(@NonNull db: SupportSQLiteDatabase): Unit
Called after the database was destructively migrated
Parameters | |
---|---|
db |
SupportSQLiteDatabase: The database. |
onOpen
open fun onOpen(@NonNull db: SupportSQLiteDatabase): Unit
Called when the database has been opened.
Parameters | |
---|---|
db |
SupportSQLiteDatabase: The database. |