comparison roundup/hyperdb.py @ 3684:bffa231ec3bc

Fixes: - Fixed StringSort test case to require case-insensitive sorting - Fixed hyperdb sort_repr for String to user lower() - Fixed SQL backends to sort by lower(string) -- only mysql sorts lowercase by default, so doing a special case for mysql didn't seem worth the effort.
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Tue, 22 Aug 2006 19:33:02 +0000
parents 193f316dbbe9
children ff9f4ca42454
comparison
equal deleted inserted replaced
3683:ad5e1d75e028 3684:bffa231ec3bc
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: hyperdb.py,v 1.124 2006-08-21 12:19:48 schlatterbeck Exp $ 18 # $Id: hyperdb.py,v 1.125 2006-08-22 19:33:02 schlatterbeck Exp $
19 19
20 """Hyperdatabase implementation, especially field types. 20 """Hyperdatabase implementation, especially field types.
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
54 self.indexme = indexme == 'yes' 54 self.indexme = indexme == 'yes'
55 def from_raw(self, value, **kw): 55 def from_raw(self, value, **kw):
56 """fix the CRLF/CR -> LF stuff""" 56 """fix the CRLF/CR -> LF stuff"""
57 return fixNewlines(value) 57 return fixNewlines(value)
58 def sort_repr (self, cls, val, name): 58 def sort_repr (self, cls, val, name):
59 if not val:
60 return val
59 if name == 'id': 61 if name == 'id':
60 return int(val) 62 return int(val)
61 return val 63 return val.lower()
62 64
63 class Password(_Type): 65 class Password(_Type):
64 """An object designating a Password property.""" 66 """An object designating a Password property."""
65 def from_raw(self, value, **kw): 67 def from_raw(self, value, **kw):
66 if not value: 68 if not value:

Roundup Issue Tracker: http://roundup-tracker.org/