public abstract class H2OpenHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection.
|
H2Database |
getReadableDatabase()
Open a read-only connection.
|
H2Database |
getWritableDatabase()
Open a read-write connection.
|
abstract void |
onCreate(H2Database db)
This method is called when the database did not already exist.
|
void |
onOpen(H2Database db)
This method is called after opening the database.
|
abstract void |
onUpgrade(H2Database db,
int oldVersion,
int newVersion)
This method is called when the version stored in the database file does
not match the expected value.
|
public void close()
public H2Database getReadableDatabase()
public H2Database getWritableDatabase()
public abstract void onCreate(H2Database db)
db - the connectionpublic void onOpen(H2Database db)
db - the connectionpublic abstract void onUpgrade(H2Database db, int oldVersion, int newVersion)
db - the connectionoldVersion - the current versionnewVersion - the expected version