def delete(self):
        assert self.query.can_filter(), \
                "Cannot use 'limit' or 'offset' with delete."

        del_query = self._clone()

        # Disable non-supported fields.
        del_query.query.select_related = False
        del_query.query.clear_ordering()

        for obj in del_query:
            obj.delete()

        # Clear the result cache, in case this QuerySet gets reused.
        self._result_cache = None
Get all the client account_data that has changed on the server
dataset/ETHPy150Open charles-vdulac/django-roa/django_roa/db/query.py/RemoteQuerySet.delete--crossover with--dataset/ETHPy150Open matrix-org/synapse/synapse/storage/account_data.py/AccountDataStore.get_all_updated_account_data