From: brian z. <bz...@us...> - 2002-11-27 15:43:33
|
Update of /cvsroot/jython/jython/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv21510/Lib Modified Files: dbexts.py Log Message: changed empty results from None to [] Index: dbexts.py =================================================================== RCS file: /cvsroot/jython/jython/Lib/dbexts.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dbexts.py 29 Oct 2002 14:24:03 -0000 1.9 --- dbexts.py 27 Nov 2002 15:43:30 -0000 1.10 *************** *** 174,179 **** def __init__(self, dbname=None, cfg=None, formatter=console, autocommit=0, jndiname=None, out=None): self.verbose = 1 ! self.results = None ! self.headers = None self.autocommit = autocommit self.formatter = formatter --- 174,179 ---- def __init__(self, dbname=None, cfg=None, formatter=console, autocommit=0, jndiname=None, out=None): self.verbose = 1 ! self.results = [] ! self.headers = [] self.autocommit = autocommit self.formatter = formatter *************** *** 260,264 **** def begin(self): """ reset ivars and return a new cursor, possibly binding an auxiliary datahandler """ ! self.headers, self.results = None, None c = self.db.cursor() if __OS__ == 'java': --- 260,264 ---- def begin(self): """ reset ivars and return a new cursor, possibly binding an auxiliary datahandler """ ! self.headers, self.results = [], [] c = self.db.cursor() if __OS__ == 'java': *************** *** 278,283 **** s = cursor.nextset() while s: ! f = cursor.fetchall() ! if f: self.results = choose(self.results is None, [], self.results) + f s = cursor.nextset() if hasattr(cursor, "lastrowid"): --- 278,282 ---- s = cursor.nextset() while s: ! self.results += cursor.fetchall() s = cursor.nextset() if hasattr(cursor, "lastrowid"): |