![]() Long insert(String table, String nullColumnHack, ContentValues values) To execute the sql query not select query. Some of the important methods of the SQLiteDatabase class are: Method The SQLiteDatabase class has many methods. The methods like create, update, delete, select, etc, that are performed on the SQLite database are included in the SQLiteDatabase class. To be called when the database needs to be downgraded. Public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) To be called when the database needs to be upgraded. Public abstract void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) To be called when the database is created for the first time. ![]() Public abstract void onCreate(SQLiteDatabase db) Some of the important methods of the SQLiteOpenHelper class are: Method The SQLiteOpenHelper class has many methods. To create an object that can create, open and manage the database, and to also specify the error handler. SQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version, DatabaseErrorHandler errorHandler) To create an object that can create, open and manage the database. SQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) The SQLiteOpenHelper class has two constructors. The implementation of onCreate() and onUpgrade() methods of SQLiteOpenHelper class is required to be provided to perform any database operation. The functionality to use the SQLite database is provided by the class which is used for database creation and version management.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |