[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8226 - in trunk/gnue-common/src/datasources/drivers: DBSIG2 sql/
From: |
reinhard |
Subject: |
[gnue] r8226 - in trunk/gnue-common/src/datasources/drivers: DBSIG2 sql/interbase sql/sqlite3 |
Date: |
Tue, 14 Mar 2006 01:55:16 -0600 (CST) |
Author: reinhard
Date: 2006-03-14 01:55:16 -0600 (Tue, 14 Mar 2006)
New Revision: 8226
Modified:
trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py
trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py
Log:
Introduced option to fetch the whole result set from the very beginning.
Issue56 [fixed]
Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2006-03-13 15:57:35 UTC (rev 8225)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2006-03-14 07:55:16 UTC (rev 8226)
@@ -77,6 +77,9 @@
_broken_fetchmany_ = False # Does fetchmany () raise an exception
# when no records are left?
_broken_rowcount_ = False # Is cursor.rowcount unusable?
+ _must_fetchall_ = False # Do we have to use fetchall () instead
+ # of fetchmany () because the open
+ # cursor will not survive a commit?
_named_as_sequence_ = False # Pass 'named' parameters as sequence
_std_datetime_ = False
Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
2006-03-13 15:57:35 UTC (rev 8225)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
2006-03-14 07:55:16 UTC (rev 8226)
@@ -174,7 +174,9 @@
while True:
# fetch next records from the backend
- if self.__connection._broken_fetchmany_:
+ if self.__connection._must_fetchall_:
+ rows = self.__cursor.fetchall ()
+ elif self.__connection._broken_fetchmany_:
try:
rows = self.__cursor.fetchmany (cachesize)
except:
Modified:
trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py
2006-03-13 15:57:35 UTC (rev 8225)
+++ trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py
2006-03-14 07:55:16 UTC (rev 8226)
@@ -113,6 +113,7 @@
_behavior_ = Behavior.Behavior
_broken_rowcount_ = True
+ _must_fetchall_ = True
# ---------------------------------------------------------------------------
Modified: trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py
2006-03-13 15:57:35 UTC (rev 8225)
+++ trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py
2006-03-14 07:55:16 UTC (rev 8226)
@@ -111,6 +111,7 @@
_std_datetime_ = True
_rowidField_ = u'oid'
_broken_rowcount_ = True
+ _must_fetchall_ = True
# ---------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8226 - in trunk/gnue-common/src/datasources/drivers: DBSIG2 sql/interbase sql/sqlite3,
reinhard <=