RoomDatabase.Callback



Callback for RoomDatabase

Summary

Public constructors

android
Cmn
N

Public functions

open suspend Unit

Called when the database is created for the first time.

Cmn
android
N
open suspend Unit

Called after the database was destructively migrated.

Cmn
android
N
open suspend Unit
onOpen(connection: SQLiteConnection)

Called when the database has been opened.

Cmn
android
N

Public constructors

Callback

Callback()

Callback

Callback()

Callback

Callback()

Public functions

onCreate

open suspend fun onCreate(connection: SQLiteConnection): Unit

Called when the database is created for the first time.

This function called after all the tables are created.

Parameters
connection: SQLiteConnection

The database connection.

onDestructiveMigration

open suspend fun onDestructiveMigration(connection: SQLiteConnection): Unit

Called after the database was destructively migrated.

Parameters
connection: SQLiteConnection

The database connection.

onOpen

open suspend fun onOpen(connection: SQLiteConnection): Unit

Called when the database has been opened.

Parameters
connection: SQLiteConnection

The database connection.