Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-21 Thread Oleg Broytmann
On Fri, Mar 21, 2008 at 08:18:54PM +0900, masayuki.takagi wrote: > I think that cursor objects has all result sets as list in it even > when i use cursor.fetchone(). > So it would be still the cause of swapping out. AFAIR it's a problem in MySQLdb, other DB API drivers do fetch properly. Ole

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-21 Thread masayuki.takagi
On Mon, 17 Mar 2008 15:55:03 +0300, Oleg Broytmann wrote: > On Mon, Mar 17, 2008 at 03:51:47PM +0300, Oleg Broytmann wrote: >>BTW, SelectResults (i.e., the result of calling .select()) has >> .lazyIter() method that returns an iterator that inside its .next >> () method >> calls cursor.fetcho

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-21 Thread masayuki.takagi
>> 2. queryAll fetches the results by calling DB API cursor.fetchall >> (). To >> make queryAll a generator one must rewrite the method to at least >> to use >> cursor.fetchmany(). > >I will accept patches for the trunk. i have tried MySQLdb.cursors.SSCursor instead of the default Cursor