server/sources/rql2sql.py
branchstable
changeset 7394 d11d88bd08e8
parent 7357 5ad3154a8810
child 7396 8345ee2c2ea6
equal deleted inserted replaced
7393:7824d61f41a2 7394:d11d88bd08e8
  1021                 # some other relation
  1021                 # some other relation
  1022                 return ''
  1022                 return ''
  1023             # attribute relation
  1023             # attribute relation
  1024             if rtype == 'has_text':
  1024             if rtype == 'has_text':
  1025                 sql = self._visit_has_text_relation(relation)
  1025                 sql = self._visit_has_text_relation(relation)
       
  1026             elif rtype == 'eid':
       
  1027                 sql =  '%s%s' % (relation.children[0].variable.accept(self),
       
  1028                                  relation.children[1].accept(self))
  1026             else:
  1029             else:
  1027                 rhs_vars = rhs.get_nodes(VariableRef)
  1030                 rhs_vars = rhs.get_nodes(VariableRef)
  1028                 if rhs_vars:
  1031                 if rhs_vars:
  1029                     # if variable(s) in the RHS
  1032                     # if variable(s) in the RHS
  1030                     sql = self._visit_var_attr_relation(relation, rhs_vars)
  1033                     sql = self._visit_var_attr_relation(relation, rhs_vars)