dabo Commit
Revision 7089
Date: 2012-02-09 20:02:12 -0800 (Thu, 09 Feb 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7089

Changed:
U   trunk/dabo/db/dCursorMixin.py

Log:
Add setDataSet() function to dCursor. Allows using the full cursor interface
which has useful methods like locate() and seek() when you happen to have
a dDataSet most likely gotten from cur.getDataSet().execute("select ...") 



Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py       2012-02-09 00:20:02 UTC (rev 7088)
+++ trunk/dabo/db/dCursorMixin.py       2012-02-10 04:02:12 UTC (rev 7089)
@@ -1362,6 +1362,16 @@
                return ret
 
 
+       def setDataSet(self, ds):
+               """
+               Set the records of the cursor to the passed dDataSet instance. 
+
+               Obviously, use with care. You can't get the original records 
back 
+               and this is really intended for one-off read-only cursors.
+               """
+               self._records = ds
+
+
        def getDataSet(self, flds=(), rowStart=0, rows=None, 
returnInternals=False):
                """
                Get the entire data set encapsulated in a dDataSet object.



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to