def delete(self, id: int): result = LabelEntity.delete_by_id(id) DatasetEntryEntity.update(label=None).where(DatasetEntryEntity.label == id).execute() return result
def tag_entries(self, entries: [DatasetEntryVO], label: LabelVO): ids = [vo.id for vo in entries] for chunk in MiscUtilities.chunk(ids, 100): rows = (DatasetEntryEntity.update(label=label.id).where( DatasetEntryEntity.id.in_(list(chunk))).execute())