public abstract class

RoomOpenHelper.Delegate

extends java.lang.Object

 java.lang.Object

↳androidx.room.RoomOpenHelper.Delegate

Summary

Fields
public final intversion

Constructors
publicDelegate(int version)

Methods
protected abstract voidcreateAllTables(SupportSQLiteDatabase database)

protected abstract voiddropAllTables(SupportSQLiteDatabase database)

protected abstract voidonCreate(SupportSQLiteDatabase database)

protected abstract voidonOpen(SupportSQLiteDatabase database)

protected voidonPostMigrate(SupportSQLiteDatabase database)

Called after migrations execute to perform additional work.

protected voidonPreMigrate(SupportSQLiteDatabase database)

Called before migrations execute to perform preliminary work.

protected RoomOpenHelper.ValidationResultonValidateSchema(SupportSQLiteDatabase db)

Called after a migration run or pre-package database copy to validate database integrity.

protected voidvalidateMigration(SupportSQLiteDatabase db)

Called after a migration run to validate database integrity.

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

Fields

public final int version

Constructors

public Delegate(int version)

Methods

protected abstract void dropAllTables(SupportSQLiteDatabase database)

protected abstract void createAllTables(SupportSQLiteDatabase database)

protected abstract void onOpen(SupportSQLiteDatabase database)

protected abstract void onCreate(SupportSQLiteDatabase database)

protected void validateMigration(SupportSQLiteDatabase db)

Deprecated: Use RoomOpenHelper.Delegate.onValidateSchema(SupportSQLiteDatabase)

Called after a migration run to validate database integrity.

Parameters:

db: The SQLite database.

Called after a migration run or pre-package database copy to validate database integrity.

Parameters:

db: The SQLite database.

protected void onPreMigrate(SupportSQLiteDatabase database)

Called before migrations execute to perform preliminary work.

Parameters:

database: The SQLite database.

protected void onPostMigrate(SupportSQLiteDatabase database)

Called after migrations execute to perform additional work.

Parameters:

database: The SQLite database.