[ZODB-Dev] Clean way to iterate over all oids/objects in a Storage?

Barry A. Warsaw barry@zope.com
Mon, 26 Aug 2002 19:40:19 -0400


>>>>> "PN" == Pieter Nagel <pieter@nagel.co.za> writes:

    PN> I am writing a migration framework for ZODB applications, and
    PN> quite often I need to iterate over all oids in a Storage.

Storages can support an iteration protocol, which touches every object
in every transaction, but that may be more work than you need.  The
API doesn't give direct access to all the oids the storage knows
about, although most storages have this information fairly close to
the surface.  It wouldn't be tough to give a storage an oids() method
that returned such a list (or a compatible iterator).

-Barry