server/rqlannotation.py
branchstable
changeset 2353 b11f1068a0d3
parent 2199 bd0a0f219751
child 3249 280080eadb22
equal deleted inserted replaced
2352:734eb79680e9 2353:b11f1068a0d3
    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