[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r10185 - in trunk/gnue-common: . src/datasources/drivers/DBSIG2
From: |
reinhard |
Subject: |
[gnue] r10185 - in trunk/gnue-common: . src/datasources/drivers/DBSIG2 |
Date: |
Tue, 25 May 2010 06:42:28 -0500 (CDT) |
Author: reinhard
Date: 2010-05-25 06:42:28 -0500 (Tue, 25 May 2010)
New Revision: 10185
Modified:
trunk/gnue-common/
trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
Log:
When _must_fetchall_ is set, don't make a separate query to find out the record
count.
Property changes on: trunk/gnue-common
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2010-05-25 12:10:23.839999914 +0200
committer: Reinhard Müller <address@hidden>
properties:
branch-nick: common
+ timestamp: 2010-05-25 13:40:15.319000006 +0200
committer: Reinhard Müller <address@hidden>
properties:
branch-nick: common
Name: bzr:file-ids
- src/datasources/GDataSource.py
address@hidden:trunk%2Fgnue-common:src%2Fdatasources%2FGDataSource.py
+ src/datasources/drivers/DBSIG2/ResultSet.py
address@hidden:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2FDBSIG2%2FResultSet.py
Name: bzr:revision-id:v4
- 3116 address@hidden
3117 address@hidden
3118 address@hidden
3119 address@hidden
3120 address@hidden
3121 address@hidden
3122 address@hidden
3123 address@hidden
+ 3116 address@hidden
3117 address@hidden
3118 address@hidden
3119 address@hidden
3120 address@hidden
3121 address@hidden
3122 address@hidden
3123 address@hidden
3124 address@hidden
Name: bzr:text-parents
- src/datasources/GDataSource.py
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9986
+ src/datasources/drivers/DBSIG2/ResultSet.py
svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954
Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
2010-05-25 10:12:33 UTC (rev 10184)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/ResultSet.py
2010-05-25 11:42:28 UTC (rev 10185)
@@ -75,7 +75,7 @@
# If the connection has a broken row count, query for the number of records
# first. This avoids conflicts with some drivers not supporting multiple
# open cursors (like adodbapi).
- if connection._broken_rowcount_:
+ if connection._broken_rowcount_ and not connection._must_fetchall_:
if distinct:
self.__count = 0
else:
@@ -85,7 +85,10 @@
query = self.__buildQuery (table, what, where, sortorder)
self.__cursor = connection.makecursor (query, params)
- if not connection._broken_rowcount_:
+ if connection._must_fetchall_:
+ self.__rows = self.__cursor.fetchall()
+ self.__count = len(self.__rows)
+ elif not connection._broken_rowcount_:
self.__count = self.__cursor.rowcount
# If the driver has a broken rowcount, but does not report it as broken,
@@ -176,7 +179,8 @@
# fetch next records from the backend
if self.__connection._must_fetchall_:
- rows = self.__cursor.fetchall ()
+ rows = self.__rows
+ self.__rows = []
elif self.__connection._broken_fetchmany_:
try:
rows = self.__cursor.fetchmany (cachesize)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r10185 - in trunk/gnue-common: . src/datasources/drivers/DBSIG2,
reinhard <=