Code example for SQLiteCursor

Methods: close, getInt, moveToFirst

0
	        try { 
	        	db = this.getWritableDatabase();
				if (dynamicValues == null) { dynamicValues = new String[0]; }
		        db.execSQL(this.stripQuery(query), dynamicValues);
		        cursor = (SQLiteCursor) db.rawQuery("SELECT changes()", null);
		        cursor.moveToFirst();
		        return new SQLiteFuture<Integer> (cursor.getInt(0));
			} 
			catch (SQLiteException e) { throw new SQLException (e.getMessage()); }
	        finally { 
	        	if (cursor != null) {	cursor.close(); }
	        	if (db != null) {		db.close(); }
	        } 
		} 
 
		/** 
		 * Execute a query that modifies data in the database (think of SELECT, UPDATE, DELETE, ...) 
		 */ 
		public Future<Integer> modificationQuery(String query) throws SQLException {
			return this.modificationQuery(query, null);
		}