Commit be33b14
Ralf Schlatterbeck
Added a test case for string comparison:
- For now allow both with and without case-sensitive comparison. In my
test Anydbm, Metakit and MySQL compare without case while Postgres
and SQLite compare with case.
Maybe the collation sequence should be defined by a backend language
option in the configuration?
Note that this *will* be a problem when Multilink-Sorting is
implemented in a generic module: In that case the string comparison
will differ when Multilinks are used in a query :-(
- When reviewing the source code for sorting in the various backends I
discovered an obscure piece of code in back_anydb::
if isinstance(propclass, hyperdb.String):
# it might be a string that's really an integer
try: tv = int(v)
except: v = v.lower()
else: v = tv
This tries to convert strings to integers. Bad. Maybe a misguided
attempt at fixing the sorting by id to be numeric (no this won't do
it) I've added a test that only anydbm fails.
I will remove that bug in the upcoming transitive sorting.1 parent 997670e commit be33b14
1 file changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1060 | 1088 | | |
1061 | 1089 | | |
1062 | 1090 | | |
| |||
0 commit comments