server/sources/rql2sql.py
branchstable
changeset 4114 a75a6e770717
parent 3989 8b471739fb33
child 4121 09622a18501c
equal deleted inserted replaced
4113:986fc01be83c 4114:a75a6e770717
   993             if rel is not None:
   993             if rel is not None:
   994                 rel._q_needcast = value
   994                 rel._q_needcast = value
   995             return self.keyword_map[value]()
   995             return self.keyword_map[value]()
   996         if constant.type == 'Boolean':
   996         if constant.type == 'Boolean':
   997             value = self.dbms_helper.boolean_value(value)
   997             value = self.dbms_helper.boolean_value(value)
   998         if constant.type == 'Substitute':
   998         elif constant.type == 'Password' or constant.type == 'Bytes':
       
   999             value = self.dbms_helper.binary_value(value)
       
  1000         elif constant.type == 'Substitute':
   999             _id = constant.value
  1001             _id = constant.value
  1000             if isinstance(_id, unicode):
  1002             if isinstance(_id, unicode):
  1001                 _id = _id.encode()
  1003                 _id = _id.encode()
  1002         else:
  1004         else:
  1003             _id = str(id(constant)).replace('-', '', 1)
  1005             _id = str(id(constant)).replace('-', '', 1)