equal
deleted
inserted
replaced
884 for attr, values in kwargs.iteritems(): |
884 for attr, values in kwargs.iteritems(): |
885 if attr.startswith('reverse_'): |
885 if attr.startswith('reverse_'): |
886 restr = 'Y %s X' % attr[len('reverse_'):] |
886 restr = 'Y %s X' % attr[len('reverse_'):] |
887 else: |
887 else: |
888 restr = 'X %s Y' % attr |
888 restr = 'X %s Y' % attr |
|
889 if not isinstance(values, (tuple, list, set, frozenset)): |
|
890 values = (values,) |
889 execute('SET %s WHERE X eid %%(x)s, Y eid IN (%s)' % ( |
891 execute('SET %s WHERE X eid %%(x)s, Y eid IN (%s)' % ( |
890 restr, ','.join(str(r.eid) for r in values)), |
892 restr, ','.join(str(r.eid) for r in values)), |
891 {'x': self.eid}, 'x') |
893 {'x': self.eid}, 'x') |
892 |
894 |
893 def delete(self): |
895 def delete(self): |