![]() Public abstract void onCreate(SQLiteDatabase db)Ĭalled only once when the database is created for the first time. There are several methods available in the SQLiteOpenHelper class. SQLiteOpenHelper(context: Context, name: String, factory: SQLiteDatabase.CursorFactory, version: Int, errorHandler: DatabaseErrorHandler)Ĭreates an object of SQLiteOpenHelper for creating, opening and managing the database. SQLiteOpenHelper(context: Context, name: String, factory: SQLiteDatabase.CursorFactory, version: Int)Ĭreates an object of SQLiteOpenHelper for creating, opening and managing the database. There are two constructors of SQLiteOpenHelper class. For performing any database operation, you have to provide the implementation of onCreate() and onUpgrade() methods of SQLiteOpenHelper class. The class is used for database creation and version management. The SQLiteOpenHelper class provides the functionality to use the SQLite database. So, there is no need to perform any database setup or administration task. SQLite is an open-source relational database that is used to perform database operations on Android devices such as storing, manipulating or retrieving persistent data from the database.īy default SQLite database is embedded in android. ![]() Next → ← prev Kotlin Android SQLite Tutorial
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |