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 |