There's a semi-formal api for iterating over the current records in a storage. It is best explained with an example:

            >>> next = None
            >>> while 1:
... oid, tid, data, next = storage.record_iternext (next)
            ...     # do things with oid, tid, and data
            ...     if next is None:
            ...         break

Basically, next captures iterator state and you call record_iternext repeatedly until next becomes None. This low-level API was designed to work with ZEO. Maybe some day, we'll build a higher-level API on top of it. The API is broken, because versions aren't returned. In fact, the current FileStorage implementation of this, which tries to ignore versions will fail if there are objects in the FileStorage that are creates in a uncommitted version. We either need to fix this API, or stop supporting versions. (Not that we're really supporting them very well now.)


Jim Fulton                      mailto:[EMAIL PROTECTED]                Python 
CTO                             (540) 361-1714         
Zope Corporation   

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -

Reply via email to