server/sqlutils.py
branchstable
changeset 9335 7da91456be2c
parent 9334 ea12401c0a68
child 9340 b1e933b0e850
equal deleted inserted replaced
9334:ea12401c0a68 9335:7da91456be2c
   335             self.values = []
   335             self.values = []
   336         def step(self, value):
   336         def step(self, value):
   337             if value is not None:
   337             if value is not None:
   338                 self.values.append(value)
   338                 self.values.append(value)
   339         def finalize(self):
   339         def finalize(self):
   340             return ', '.join(str(v) for v in self.values)
   340             return ', '.join(unicode(v) for v in self.values)
   341 
   341 
   342     cnx.create_aggregate("GROUP_CONCAT", 1, group_concat)
   342     cnx.create_aggregate("GROUP_CONCAT", 1, group_concat)
   343 
   343 
   344     def _limit_size(text, maxsize, format='text/plain'):
   344     def _limit_size(text, maxsize, format='text/plain'):
   345         if len(text) < maxsize:
   345         if len(text) < maxsize: