comparison roundup/backends/rdbms_common.py @ 1172:e7e56ad506de

removed debugging
author Richard Jones <richard@users.sourceforge.net>
date Thu, 19 Sep 2002 03:56:20 +0000
parents 8784a11f8c2f
children 58f1a2c174ed
comparison
equal deleted inserted replaced
1171:8784a11f8c2f 1172:e7e56ad506de
1 # $Id: rdbms_common.py,v 1.4 2002-09-19 03:39:48 richard Exp $ 1 # $Id: rdbms_common.py,v 1.5 2002-09-19 03:56:20 richard Exp $
2 2
3 # standard python modules 3 # standard python modules
4 import sys, os, time, re, errno, weakref, copy 4 import sys, os, time, re, errno, weakref, copy
5 5
6 # roundup modules 6 # roundup modules
1722 sql = 'select %s from %s %s%s%s'%(cols, frum, where, group, order) 1722 sql = 'select %s from %s %s%s%s'%(cols, frum, where, group, order)
1723 args = tuple(args) 1723 args = tuple(args)
1724 if __debug__: 1724 if __debug__:
1725 print >>hyperdb.DEBUG, 'filter', (self, sql, args) 1725 print >>hyperdb.DEBUG, 'filter', (self, sql, args)
1726 cursor = self.db.conn.cursor() 1726 cursor = self.db.conn.cursor()
1727 print (sql, args)
1728 cursor.execute(sql, args) 1727 cursor.execute(sql, args)
1729 l = cursor.fetchall() 1728 l = cursor.fetchall()
1730 print l
1731 1729
1732 # return the IDs (the first column) 1730 # return the IDs (the first column)
1733 # XXX The filter(None, l) bit is sqlite-specific... if there's _NO_ 1731 # XXX The filter(None, l) bit is sqlite-specific... if there's _NO_
1734 # XXX matches to a fetch, it returns NULL instead of nothing!?! 1732 # XXX matches to a fetch, it returns NULL instead of nothing!?!
1735 return filter(None, [row[0] for row in l]) 1733 return filter(None, [row[0] for row in l])

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