server/sources/rql2sql.py
branchstable
changeset 5793 1faff41593df
parent 5782 8ff48d1a319f
child 5811 e77cea9721e7
child 5844 df7608ecea29
equal deleted inserted replaced
5792:e13aa4786a72 5793:1faff41593df
  1094         lhs, rhs = mexpr.get_parts()
  1094         lhs, rhs = mexpr.get_parts()
  1095         # check for string concatenation
  1095         # check for string concatenation
  1096         operator = mexpr.operator
  1096         operator = mexpr.operator
  1097         try:
  1097         try:
  1098             if mexpr.operator == '+' and mexpr.get_type(self._state.solution, self._args) == 'String':
  1098             if mexpr.operator == '+' and mexpr.get_type(self._state.solution, self._args) == 'String':
  1099                 operator = '||'
  1099                 return '(%s)' % self.dbhelper.sql_concat_string(lhs.accept(self),
       
  1100                                                                 rhs.accept(self))
  1100         except CoercionError:
  1101         except CoercionError:
  1101             pass
  1102             pass
  1102         return '(%s %s %s)'% (lhs.accept(self), operator, rhs.accept(self))
  1103         return '(%s %s %s)'% (lhs.accept(self), operator, rhs.accept(self))
  1103 
  1104 
  1104     def visit_function(self, func):
  1105     def visit_function(self, func):