Mercurial > p > roundup > code
diff roundup/backends/rdbms_common.py @ 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 | ead9f926234a |
line wrap: on
line diff
--- 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)
