equal
deleted
inserted
replaced
983 if self.do_fti and need_fti_update: |
983 if self.do_fti and need_fti_update: |
984 # reindex the entity only if this query is updating at least |
984 # reindex the entity only if this query is updating at least |
985 # one indexable attribute |
985 # one indexable attribute |
986 self.index_entity(session, entity=entity) |
986 self.index_entity(session, entity=entity) |
987 |
987 |
988 def delete_info_multi(self, session, entities, uri): |
988 def delete_info_multi(self, session, entities): |
989 """delete system information on deletion of a list of entities with the |
989 """delete system information on deletion of a list of entities with the |
990 same etype and belinging to the same source |
990 same etype and belinging to the same source |
991 |
991 |
992 * update the fti |
992 * update the fti |
993 * remove record from the `entities` table |
993 * remove record from the `entities` table |
1303 # delete the entity |
1303 # delete the entity |
1304 attrs = {'cw_eid': eid} |
1304 attrs = {'cw_eid': eid} |
1305 sql = self.sqlgen.delete(SQL_PREFIX + entity.cw_etype, attrs) |
1305 sql = self.sqlgen.delete(SQL_PREFIX + entity.cw_etype, attrs) |
1306 self.doexec(session, sql, attrs) |
1306 self.doexec(session, sql, attrs) |
1307 # remove record from entities (will update fti if needed) |
1307 # remove record from entities (will update fti if needed) |
1308 self.delete_info_multi(session, [entity], self.uri) |
1308 self.delete_info_multi(session, [entity]) |
1309 self.repo.hm.call_hooks('after_delete_entity', session, entity=entity) |
1309 self.repo.hm.call_hooks('after_delete_entity', session, entity=entity) |
1310 return () |
1310 return () |
1311 |
1311 |
1312 def _undo_u(self, session, action): |
1312 def _undo_u(self, session, action): |
1313 """undo an entity update""" |
1313 """undo an entity update""" |