comparison roundup/backends/back_postgresql.py @ 3685:4d9adb8bc3b1

Null-value sorting fixes: - Fixed sorting of NULL values for the PostgreSQL backend. Generic implementation of additional sort-key for NULL values, can be reused by other (future) rdbms backends. - Added a test for NULL value sorting and removed an override for the Interval test for the PostgreSQL backend which had a special case for NULL values
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Wed, 23 Aug 2006 12:57:10 +0000
parents bfb120928309
children ff9f4ca42454
comparison
equal deleted inserted replaced
3684:bffa231ec3bc 3685:4d9adb8bc3b1
1 #$Id: back_postgresql.py,v 1.32 2006-08-11 00:44:00 richard Exp $ 1 #$Id: back_postgresql.py,v 1.33 2006-08-23 12:57:10 schlatterbeck Exp $
2 # 2 #
3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> 3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt>
4 # 4 #
5 # This module is free software, and you may redistribute it and/or modify 5 # This module is free software, and you may redistribute it and/or modify
6 # under the same terms as Python, so long as this copyright message and 6 # under the same terms as Python, so long as this copyright message and
221 # reset the sequences 221 # reset the sequences
222 for cn in self.classes.keys(): 222 for cn in self.classes.keys():
223 self.cursor.execute('DROP SEQUENCE _%s_ids'%cn) 223 self.cursor.execute('DROP SEQUENCE _%s_ids'%cn)
224 self.cursor.execute('CREATE SEQUENCE _%s_ids'%cn) 224 self.cursor.execute('CREATE SEQUENCE _%s_ids'%cn)
225 225
226 226 class PostgresqlClass:
227 class Class(rdbms_common.Class): 227 order_by_null_values = '(%s is not NULL)'
228
229 class Class(PostgresqlClass, rdbms_common.Class):
228 pass 230 pass
229 class IssueClass(rdbms_common.IssueClass): 231 class IssueClass(PostgresqlClass, rdbms_common.IssueClass):
230 pass 232 pass
231 class FileClass(rdbms_common.FileClass): 233 class FileClass(PostgresqlClass, rdbms_common.FileClass):
232 pass 234 pass
233 235

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