server/repository.py
branchtls-sprint
changeset 1320 c85f4d8eff8b
parent 1317 12dc957a5b55
child 1372 d4264cd876e1
equal deleted inserted replaced
1319:2fe3df4e1e60 1320:c85f4d8eff8b
   110     # consistency.
   110     # consistency.
   111     # XXX should probably not use unsafe_execute!
   111     # XXX should probably not use unsafe_execute!
   112     if card[0] in '1?':
   112     if card[0] in '1?':
   113         rschema = session.repo.schema.rschema(rtype)
   113         rschema = session.repo.schema.rschema(rtype)
   114         if not rschema.inlined:
   114         if not rschema.inlined:
   115             session.unsafe_execute('DELETE X %s Y WHERE X eid %%(x)s, NOT Y eid %%(y)s' % rtype,
   115             session.unsafe_execute(
   116                                    {'x': eidfrom, 'y': eidto}, 'x')
   116                 'DELETE X %s Y WHERE X eid %%(x)s, NOT Y eid %%(y)s' % rtype,
       
   117                 {'x': eidfrom, 'y': eidto}, 'x')
   117     if card[1] in '1?':
   118     if card[1] in '1?':
   118         session.unsafe_execute('DELETE X %s Y WHERE NOT X eid %%(x)s, Y eid %%(y)s' % rtype,
   119         session.unsafe_execute(
   119                                {'x': eidfrom, 'y': eidto}, 'y')
   120             'DELETE X %s Y WHERE NOT X eid %%(x)s, Y eid %%(y)s' % rtype,
       
   121             {'x': eidfrom, 'y': eidto}, 'y')
   120 
   122 
   121     
   123     
   122 class Repository(object):
   124 class Repository(object):
   123     """a repository provides access to a set of persistent storages for
   125     """a repository provides access to a set of persistent storages for
   124     entities and relations
   126     entities and relations