public static boolean deleteRecords(Table table, int colIx, AddressMap addrMap, Address start,
			Address end, RecordFilter filter) throws IOException {

		boolean success = false;
		DBFieldIterator iter =
			new AddressIndexPrimaryKeyIterator(table, colIx, addrMap, start, end, true);
		while (iter.hasNext()) {
			Field next = iter.next();
			if (filter != null) {
				DBRecord record = table.getRecord(next);
				if (!filter.matches(record)) {
					continue;
				}
			}
			success |= iter.delete();
		}
		return success;
	}
Deletes the records that have indexed address fields that fall within the given range.
Uses the address map to convert the
address range into 1 or more key ranges. (Address ranges may not be continuous after
converting to long space).
NOTE: Absolute key encodings are not handled currently !!
@param table the database table to delete records from.
@param colIx the column that has indexed addresses.
@param addrMap the address map used to convert addresses into long keys.
@param start the start address in the range.
@param end the end address in the range.
@throws IOException if a database io error occurs.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/map/AddressRecordDeleter.java