From: Oleg B. <ph...@ph...> - 2004-11-15 14:40:43
|
Hello! atable.select(... lazyColumns=True ...) pases lazyColumns to SelectResults(), that passes it (in self.__iter__) to dbconnection.Iteration(), whose .next() method creates an object by calling self.select.sourceClass.get(), and the .get() calls val._init() that seeing no selectResults in its turn calls self._connection._SO_selectOne() that creates another cursor to fetch the data. 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? I heard rumors that Sybase (and hence MSSQL) will have problems with two cursors. There is not SybaseConnection yet, but certainly it will appear sooner or later. The situation becomes even worse with Danila Savard's inheritance patch, because parent's .get() fetches a child calling .get() without selectResults even if lazyColumns=False. Any thoughts? Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |