OpenHelper

protected open class OpenHelper

Open helper class to manage database creation and version management. This class takes care of opening the database if it exists, creating it if it does not, and upgrading it as necessary. Transactions are used to make sure the database is always in a sensible state.

Author

sergey.zaburunov

Constructors

Link copied to clipboard
constructor()
constructor

Functions

Link copied to clipboard
open fun onCreate(db: SQLiteDatabase)
create all tables
Link copied to clipboard
open fun onOpen(db: SQLiteDatabase)
use
Link copied to clipboard
open fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int)
upgrade all tables
Link copied to clipboard
private open fun pragma(db: SQLiteDatabase, inTransaction: Boolean)
set the pragmas for the database file.