[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8453 - trunk/gnue-common/src/datasources/drivers/Base
From: |
reinhard |
Subject: |
[gnue] r8453 - trunk/gnue-common/src/datasources/drivers/Base |
Date: |
Fri, 12 May 2006 06:58:41 -0500 (CDT) |
Author: reinhard
Date: 2006-05-12 06:58:41 -0500 (Fri, 12 May 2006)
New Revision: 8453
Modified:
trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py
Log:
Added new function raw() for high performant data access.
Modified: trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2006-05-12
10:19:35 UTC (rev 8452)
+++ trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2006-05-12
11:58:41 UTC (rev 8453)
@@ -238,6 +238,30 @@
# -------------------------------------------------------------------------
+ # Get the raw data for this ResultSet
+ # -------------------------------------------------------------------------
+
+ def raw(self):
+ """
+ Return an iterator yielding the raw values of this ResultSet.
+
+ The iterator returned by this function will yield dictionaries, with
+ field names being the keys and field values being the values.
+
+ Note that this function cannot be used together with the normal
+ firstRecord/nextRecord functions, because they base on the same source
+ of data: any record fetched with firstRecord/nextRecord will not appear
+ in this iterator, and vice versa.
+
+ If you just need the raw data and do not intend to make any use of
+ L{RecordSet.RecordSet}'s features, it is strongly recommended that you
+ use this function, because it performes more than 10 times faster than
+ firstRecord/nextRecord.
+ """
+
+ return self.__generator
+
+ # -------------------------------------------------------------------------
# Get the number of records in the recordset
# -------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8453 - trunk/gnue-common/src/datasources/drivers/Base,
reinhard <=