equal
deleted
inserted
replaced
20 # print '-------- sql annotate', repr(rqlst) |
20 # print '-------- sql annotate', repr(rqlst) |
21 getrschema = annotator.schema.rschema |
21 getrschema = annotator.schema.rschema |
22 has_text_query = False |
22 has_text_query = False |
23 need_distinct = rqlst.distinct |
23 need_distinct = rqlst.distinct |
24 for rel in rqlst.iget_nodes(Relation): |
24 for rel in rqlst.iget_nodes(Relation): |
25 if getrschema(rel.r_type).symetric: |
25 if getrschema(rel.r_type).symetric and not rel.neged(strict=True): |
26 for vref in rel.iget_nodes(VariableRef): |
26 for vref in rel.iget_nodes(VariableRef): |
27 stinfo = vref.variable.stinfo |
27 stinfo = vref.variable.stinfo |
28 if not stinfo['constnode'] and stinfo['selected']: |
28 if not stinfo['constnode'] and stinfo['selected']: |
29 need_distinct = True |
29 need_distinct = True |
30 # XXX could mark as not invariant |
30 # XXX could mark as not invariant |