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.fetchone() instead of .fetchall(). So you can try
> 
> for row in MyTable.select(condition).lazyIter():
>    process(row)

   The problem with this approach is that all fetched rows are put into
SQLObject's cache, so that process() must clear the cache from time to
time:

MyTable._connection.cache.clear()

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to