server/sources/extlite.py
branchstable
changeset 2101 08003e0354a7
parent 2068 3d1961426bed
child 2306 95da5d9f0870
equal deleted inserted replaced
2100:89b825cdec74 2101:08003e0354a7
   241 
   241 
   242     def delete_relation(self, session, subject, rtype, object):
   242     def delete_relation(self, session, subject, rtype, object):
   243         """delete a relation from the source"""
   243         """delete a relation from the source"""
   244         rschema = self.schema.rschema(rtype)
   244         rschema = self.schema.rschema(rtype)
   245         if rschema.inlined:
   245         if rschema.inlined:
   246             if subject in session.query_data('pendingeids', ()):
   246             if subject in session.transaction_data.get('pendingeids', ()):
   247                 return
   247                 return
   248             table = SQL_PREFIX + session.describe(subject)[0]
   248             table = SQL_PREFIX + session.describe(subject)[0]
   249             column = SQL_PREFIX + rtype
   249             column = SQL_PREFIX + rtype
   250             sql = 'UPDATE %s SET %s=NULL WHERE %seid=%%(eid)s' % (table, column, SQL_PREFIX)
   250             sql = 'UPDATE %s SET %s=NULL WHERE %seid=%%(eid)s' % (table, column, SQL_PREFIX)
   251             attrs = {'eid' : subject}
   251             attrs = {'eid' : subject}