equal
deleted
inserted
replaced
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} |