server/sources/rql2sql.py
changeset 1382 618f6aee8d52
parent 1251 af40e615dc89
child 1477 b056a49c16dc
child 1497 54fc5cc52210
equal deleted inserted replaced
1381:6042f1b342bb 1382:618f6aee8d52
   934                               rhs.accept(self, contextrels))
   934                               rhs.accept(self, contextrels))
   935         
   935         
   936     def visit_function(self, func, contextrels=None):
   936     def visit_function(self, func, contextrels=None):
   937         """generate SQL name for a function"""
   937         """generate SQL name for a function"""
   938         # function_description will check function is supported by the backend
   938         # function_description will check function is supported by the backend
   939         self.dbms_helper.function_description(func.name) 
   939         sqlname = self.dbms_helper.func_sqlname(func.name) 
   940         return '%s(%s)' % (func.name, ', '.join(c.accept(self, contextrels)
   940         return '%s(%s)' % (sqlname, ', '.join(c.accept(self, contextrels)
   941                                                 for c in func.children))
   941                                               for c in func.children))
   942 
   942 
   943     def visit_constant(self, constant, contextrels=None):
   943     def visit_constant(self, constant, contextrels=None):
   944         """generate SQL name for a constant"""
   944         """generate SQL name for a constant"""
   945         value = constant.value
   945         value = constant.value
   946         if constant.type is None:
   946         if constant.type is None: