Re: [SQLObject] Two cursors in Iteration
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2004-11-15 15:25:04
|
Oops, followup to myself. On Mon, Nov 15, 2004 at 05:40:39PM +0300, Oleg Broytmann wrote: > Another cursor is created in the same connection while the first one > is still being iterated. Is it correct? Some DB API adapters allows it. > For example MySQLdb emulates cursors by copying all data. But what about > other adapters and databases? For every complex problem, there is a solution that is simple, neat, and wrong. Actuall, I can see two simple solutions. 1. Open another connection. Very bad for transactions. 2. Use cursor.fetchall() instead of .fetchone(). Very bad for huge data set. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |