private static EquateRefDBAdapter upgrade(DBHandle dbHandle, AddressMap addrMap,
			EquateRefDBAdapter oldAdapter, TaskMonitor monitor)
			throws VersionException, IOException {

		AddressMap oldAddrMap = addrMap.getOldAddressMap();

		DBHandle tmpHandle = new DBHandle();
		try {
			tmpHandle.startTransaction();

			monitor.setMessage("Upgrading Equate References...");
			monitor.initialize(oldAdapter.getRecordCount() * 2);

			EquateRefDBAdapter tmpAdapter = new EquateRefDBAdapterV1(tmpHandle, addrMap, true);
			RecordIterator iter = oldAdapter.getRecords();
			while (iter.hasNext()) {
				DBRecord rec = iter.next();
				Address addr = oldAddrMap.decodeAddress(rec.getLongValue(ADDR_COL));
				rec.setLongValue(ADDR_COL, addrMap.getKey(addr, true));
				rec.setLongValue(HASH_COL, 0);
				tmpAdapter.updateRecord(rec);
			}

			dbHandle.deleteTable(EQUATE_REFS_TABLE_NAME);
			EquateRefDBAdapter newAdapter = new EquateRefDBAdapterV1(dbHandle, addrMap, true);

			iter = tmpAdapter.getRecords();
			while (iter.hasNext()) {
				DBRecord rec = iter.next();
				newAdapter.updateRecord(rec);
			}
			return newAdapter;
		}
		finally {
			tmpHandle.close();
		}
	}
Adapter to access records in the equate references table.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/EquateRefDBAdapter.java