server/sources/extlite.py
changeset 4913 083b4d454192
parent 4899 c666d265fb95
child 5013 ad91f93bbb93
equal deleted inserted replaced
4912:9767cc516b4f 4913:083b4d454192
   223 
   223 
   224     def update_entity(self, session, entity):
   224     def update_entity(self, session, entity):
   225         """update an entity in the source"""
   225         """update an entity in the source"""
   226         raise NotImplementedError()
   226         raise NotImplementedError()
   227 
   227 
   228     def delete_entity(self, session, etype, eid):
   228     def delete_entity(self, session, entity):
   229         """delete an entity from the source
   229         """delete an entity from the source
   230 
   230 
   231         this is not deleting a file in the svn but deleting entities from the
   231         this is not deleting a file in the svn but deleting entities from the
   232         source. Main usage is to delete repository content when a Repository
   232         source. Main usage is to delete repository content when a Repository
   233         entity is deleted.
   233         entity is deleted.
   234         """
   234         """
   235         attrs = {SQL_PREFIX + 'eid': eid}
   235         attrs = {'cw_eid': entity.eid}
   236         sql = self.sqladapter.sqlgen.delete(SQL_PREFIX + etype, attrs)
   236         sql = self.sqladapter.sqlgen.delete(SQL_PREFIX + entity.__regid__, attrs)
   237         self.doexec(session, sql, attrs)
   237         self.doexec(session, sql, attrs)
   238 
   238 
   239     def local_add_relation(self, session, subject, rtype, object):
   239     def local_add_relation(self, session, subject, rtype, object):
   240         """add a relation to the source
   240         """add a relation to the source
   241 
   241