server/sources/rql2sql.py
branchtls-sprint
changeset 1477 b056a49c16dc
parent 1398 5fe84a5f7035
parent 1382 618f6aee8d52
child 1522 47b2ffbee760
equal deleted inserted replaced
1476:f94b41709ce6 1477:b056a49c16dc
   933                               rhs.accept(self, contextrels))
   933                               rhs.accept(self, contextrels))
   934         
   934         
   935     def visit_function(self, func, contextrels=None):
   935     def visit_function(self, func, contextrels=None):
   936         """generate SQL name for a function"""
   936         """generate SQL name for a function"""
   937         # function_description will check function is supported by the backend
   937         # function_description will check function is supported by the backend
   938         self.dbms_helper.function_description(func.name) 
   938         sqlname = self.dbms_helper.func_sqlname(func.name) 
   939         return '%s(%s)' % (func.name, ', '.join(c.accept(self, contextrels)
   939         return '%s(%s)' % (sqlname, ', '.join(c.accept(self, contextrels)
   940                                                 for c in func.children))
   940                                               for c in func.children))
   941 
   941 
   942     def visit_constant(self, constant, contextrels=None):
   942     def visit_constant(self, constant, contextrels=None):
   943         """generate SQL name for a constant"""
   943         """generate SQL name for a constant"""
   944         value = constant.value
   944         value = constant.value
   945         if constant.type is None:
   945         if constant.type is None: