added in version 2.0.0
belongs to Maven artifact androidx.room:room-runtime:2.0.0-beta01

RoomDatabase.Callback

public static abstract class RoomDatabase.Callback
extends Object

java.lang.Object
   ↳ androidx.room.RoomDatabase.Callback


Callback for RoomDatabase.

Summary

Public constructors

RoomDatabase.Callback()

Public methods

void onCreate(SupportSQLiteDatabase db)

Called when the database is created for the first time.

void onOpen(SupportSQLiteDatabase db)

Called when the database has been opened.

Inherited methods

Public constructors

RoomDatabase.Callback

added in version 2.0.0
public RoomDatabase.Callback ()

Public methods

onCreate

added in version 2.0.0
public void onCreate (SupportSQLiteDatabase db)

Called when the database is created for the first time. This is called after all the tables are created.

Parameters
db SupportSQLiteDatabase: The database.

onOpen

added in version 2.0.0
public void onOpen (SupportSQLiteDatabase db)

Called when the database has been opened.

Parameters
db SupportSQLiteDatabase: The database.