395 if isinstance(c, RQLConstraint)] |
395 if isinstance(c, RQLConstraint)] |
396 if constraints: |
396 if constraints: |
397 restrictions = ', '.join(c.restriction for c in constraints) |
397 restrictions = ', '.join(c.restriction for c in constraints) |
398 q += ', %s' % restrictions |
398 q += ', %s' % restrictions |
399 # restrict object eids if possible |
399 # restrict object eids if possible |
|
400 # XXX the attempt to restrict below in completely wrong |
|
401 # disabling it for now |
400 objeids = select(restrictions, self.cursor) |
402 objeids = select(restrictions, self.cursor) |
401 else: |
403 else: |
402 objeids = oedict.get(obj, frozenset()) |
404 objeids = oedict.get(obj, frozenset()) |
|
405 ## objeids = oedict.get(obj, frozenset()) |
403 if subjcard in '?1' or objcard in '?1': |
406 if subjcard in '?1' or objcard in '?1': |
404 for subjeid, objeid in used: |
407 for subjeid, objeid in used: |
405 if subjcard in '?1' and subjeid in subjeids: |
408 if subjcard in '?1' and subjeid in subjeids: |
406 subjeids.remove(subjeid) |
409 subjeids.remove(subjeid) |
407 # XXX why? |
410 # XXX why? |