server/sources/rql2sql.py
changeset 7256 ccd44caeb936
parent 7252 adb1673efa5f
child 7257 beea955b45e2
equal deleted inserted replaced
7253:68b9e21efa63 7256:ccd44caeb936
  1405     def visit_constant(self, constant):
  1405     def visit_constant(self, constant):
  1406         """generate SQL name for a constant"""
  1406         """generate SQL name for a constant"""
  1407         if constant.type is None:
  1407         if constant.type is None:
  1408             return 'NULL'
  1408             return 'NULL'
  1409         value = constant.value
  1409         value = constant.value
       
  1410         if constant.type == 'etype':
       
  1411             return value
  1410         if constant.type == 'Int' and  isinstance(constant.parent, SortTerm):
  1412         if constant.type == 'Int' and  isinstance(constant.parent, SortTerm):
  1411             return value
  1413             return value
  1412         if constant.type in ('Date', 'Datetime'):
  1414         if constant.type in ('Date', 'Datetime'):
  1413             rel = constant.relation()
  1415             rel = constant.relation()
  1414             if rel is not None:
  1416             if rel is not None: