[Zope-Checkins] CVS: ZODB3/BDBStorage - BDBFullStorage.py:1.68

Barry Warsaw barry@wooz.org
Tue, 4 Feb 2003 12:07:59 -0500


Update of /cvs-repository/ZODB3/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv23078

Modified Files:
	BDBFullStorage.py 
Log Message:
_TransactionsIterator.iterator(): Add this so we can pass iterators to
BaseStorage's copyTransactionsFrom() method's "other" argument.


=== ZODB3/BDBStorage/BDBFullStorage.py 1.67 => 1.68 ===
--- ZODB3/BDBStorage/BDBFullStorage.py:1.67	Mon Jan 27 16:09:31 2003
+++ ZODB3/BDBStorage/BDBFullStorage.py	Tue Feb  4 12:07:57 2003
@@ -1791,6 +1791,13 @@
         # list()-ifying these objects.
         return 0
 
+    # This allows us to pass an iterator as the `other' argument to
+    # copyTransactionsFrom() in BaseStorage.  The advantage here is that we
+    # can create the iterator manually, e.g. setting start and stop, and then
+    # just let copyTransactionsFrom() do its thing.
+    def iterator(self):
+        return self
+
     def next(self):
         """Return the ith item in the sequence of transaction data.