Mercurial > p > roundup > code
changeset 2537:5455dd2ec6d7 maint-0.7
merge from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sat, 03 Jul 2004 23:08:44 +0000 |
| parents | 50da6d3bac46 |
| children | 5080ca961b2e |
| files | CHANGES.txt doc/index.txt roundup/backends/rdbms_common.py test/db_test_base.py |
| diffstat | 4 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Sat Jul 03 22:49:40 2004 +0000 +++ b/CHANGES.txt Sat Jul 03 23:08:44 2004 +0000 @@ -6,6 +6,7 @@ - rdbms backend full text search failure after import (sf bug 980314) - rdbms backends not filtering correctly on link=None - fix anydbm journal import (sf bug 983166) +- handle postgresql bug in SQL generation (sf bug 984591) 2004-06-24 0.7.5
--- a/doc/index.txt Sat Jul 03 22:49:40 2004 +0000 +++ b/doc/index.txt Sat Jul 03 23:08:44 2004 +0000 @@ -128,6 +128,7 @@ Nathaniel Smith, Mitchell Surface, Mike Thompson, +Martin Uzak, Darryl VanDorp, J Vickroy.
--- a/roundup/backends/rdbms_common.py Sat Jul 03 22:49:40 2004 +0000 +++ b/roundup/backends/rdbms_common.py Sat Jul 03 23:08:44 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.98.2.15 2004-07-03 22:49:40 richard Exp $ +# $Id: rdbms_common.py,v 1.98.2.16 2004-07-03 23:08:44 richard Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -2076,7 +2076,7 @@ timezone = self.db.getUserTimezone() # vars to hold the components of the SQL statement - frum = ['_'+cn] # FROM clauses + frum = [] # FROM clauses loj = [] # LEFT OUTER JOIN clauses where = [] # WHERE clauses args = [] # *any* positional arguments @@ -2248,6 +2248,7 @@ orderby.append(o) # construct the SQL + frum.append('_'+cn) frum = ','.join(frum) if where: where = ' where ' + (' and '.join(where)) @@ -2267,6 +2268,7 @@ cols = ','.join(cols) loj = ' '.join(loj) sql = 'select %s from %s %s %s%s'%(cols, frum, loj, where, order) + print sql args = tuple(args) if __debug__: print >>hyperdb.DEBUG, 'filter', (self, sql, args)
--- a/test/db_test_base.py Sat Jul 03 22:49:40 2004 +0000 +++ b/test/db_test_base.py Sat Jul 03 23:08:44 2004 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: db_test_base.py,v 1.27.2.8 2004-06-29 05:53:37 richard Exp $ +# $Id: db_test_base.py,v 1.27.2.9 2004-07-03 23:08:44 richard Exp $ import unittest, os, shutil, errno, imp, sys, time, pprint @@ -835,7 +835,7 @@ iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', - 'foo': date.Interval('1:10'), 'priority': '1', + 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': date.Date('2003-01-01.00:00')}, {'title': 'issue two', 'status': '1', 'assignedto': '2', 'foo': date.Interval('1d'), 'priority': '3', @@ -843,7 +843,7 @@ {'title': 'issue three', 'status': '1', 'priority': '2', 'nosy': ['1','2'], 'deadline': date.Date('2003-02-18')}, {'title': 'non four', 'status': '3', - 'foo': date.Interval('0:10'), 'priority': '1', + 'foo': date.Interval('0:10'), 'priority': '2', 'nosy': ['1'], 'deadline': date.Date('2004-03-08')}): self.db.issue.create(**issue) file_content = ''.join([chr(i) for i in range(255)]) @@ -880,6 +880,8 @@ ae(filt(None, {'assignedto': None}, ('+','id'), (None,None)), ['3','4']) ae(filt(None, {'assignedto': ['-1', None]}, ('+','id'), (None,None)), ['3','4']) + ae(filt(None, {'assignedto': ['1', None]}, ('+','id'), (None,None)), + ['1', '3','4']) def testFilteringRetired(self): ae, filt = self.filteringSetup() @@ -890,6 +892,8 @@ ae, filt = self.filteringSetup() ae(filt(None, {'nosy': '2'}, ('+','id'), (None,None)), ['3']) ae(filt(None, {'nosy': '-1'}, ('+','id'), (None,None)), ['1', '2']) + ae(filt(None, {'nosy': ['1','2']}, ('+', 'status'), + ('-', 'activity')), ['4', '3']) def testFilteringMany(self): ae, filt = self.filteringSetup()
