server/sources/rql2sql.py
branchstable
changeset 3987 f85ef29f6214
parent 3866 2783c166ad1a
child 3988 833cfe0fcf5f
equal deleted inserted replaced
3986:cc29eddf51ad 3987:f85ef29f6214
   691 
   691 
   692     def _visit_inlined_relation(self, relation):
   692     def _visit_inlined_relation(self, relation):
   693         lhsvar, _, rhsvar, rhsconst = relation_info(relation)
   693         lhsvar, _, rhsvar, rhsconst = relation_info(relation)
   694         # we are sure here to have a lhsvar
   694         # we are sure here to have a lhsvar
   695         assert lhsvar is not None
   695         assert lhsvar is not None
   696         if isinstance(relation.parent, Not):
   696         if isinstance(relation.parent, Not) and len(lhsvar.stinfo['relations']) > 1:
   697             self._state.done.add(relation.parent)
   697             self._state.done.add(relation.parent)
   698             if rhsvar is not None and not rhsvar._q_invariant:
   698             if rhsvar is not None and not rhsvar._q_invariant:
   699                 # if the lhs variable is only linked to this relation, this mean we
   699                 # if the lhs variable is only linked to this relation, this mean we
   700                 # only want the relation to NOT exists
   700                 # only want the relation to NOT exists
   701                 self._state.push_scope()
   701                 self._state.push_scope()