Code example for SQLiteDatabase

Methods: insertOrThrow

0
		String whereClause = BookmarkDB.ID + " IN " + "(SELECT performance_flags FROM " + getBookmarkTableName() + " WHERE " + BookmarkDB.ID + " =  " + bookmark.getId() + ");";
		return (db.update("tbl_performance_flags", values, whereClause, null) == 1);		
	} 
 
	private boolean updatePerformanceFlags3G(SQLiteDatabase db, BookmarkBase bookmark) 
	{ 
		ContentValues values = new ContentValues();		
		fillPerformanceFlagsContentValues(bookmark.getAdvancedSettings().getPerformance3G(), values);
		String whereClause = BookmarkDB.ID + " IN " + "(SELECT performance_3g FROM " + getBookmarkTableName() + " WHERE " + BookmarkDB.ID + " =  " + bookmark.getId() + ");";
		return (db.update("tbl_performance_flags", values, whereClause, null) == 1);		
	} 
 
	// safety wrappers 
	// in case of getReadableDatabase it could happen that upgradeDB gets called which is  
	// a problem if the DB is only readable 
	private SQLiteDatabase getWritableDatabase()
	{ 
		return bookmarkDB.getWritableDatabase();		
	} 
	 
	private SQLiteDatabase getReadableDatabase()