Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.1.0
belongs to Maven artifact android.arch.persistence.room:runtime:1.1.0-beta2

RoomDatabase.Callback

public static abstract class RoomDatabase.Callback
extends Object

java.lang.Object
   ↳ android.arch.persistence.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 1.1.0
RoomDatabase.Callback ()

Public methods

onCreate

added in version 1.1.0
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 1.1.0
void onOpen (SupportSQLiteDatabase db)

Called when the database has been opened.

Parameters
db SupportSQLiteDatabase: The database.