public abstract class

RoomDatabase.Callback

extends java.lang.Object

 java.lang.Object

↳androidx.room.RoomDatabase.Callback

Overview

Callback for RoomDatabase.

Summary

Constructors
publicCallback()

Methods
public voidonCreate(SupportSQLiteDatabase db)

Called when the database is created for the first time.

public voidonDestructiveMigration(SupportSQLiteDatabase db)

Called after the database was destructively migrated

public voidonOpen(SupportSQLiteDatabase db)

Called when the database has been opened.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Callback()

Methods

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: The database.

public void onOpen(SupportSQLiteDatabase db)

Called when the database has been opened.

Parameters:

db: The database.

public void onDestructiveMigration(SupportSQLiteDatabase db)

Called after the database was destructively migrated

Parameters:

db: The database.