Re: [ZODB-Dev] List of references to all objects from ZODB?
by Greg Ward other posts by this author
Oct 30 2002 2:27PM messages near this date
[ZODB-Dev] List of references to all objects from ZODB?
|
Re: [ZODB-Dev] List of references to all objects from ZODB?
On 30 October 2002, Magnus Lycka said:
> Is there a way to get a list of all objects that ZODB
> thinks exists?
Yes. The idea is to loop over all OIDs, ignoring those that no longer
have an object attached to them (presumably pack()'ed away some time in
the past). The attached zodb_iterate.py does precisely this; you'll
have to replace the main program with something that will work for you,
but it should be fairly clear.
I'll also attach zodb_iterator.py, which is a more modern/OO
implementation of the same idea.
Greg
--
Greg Ward - software developer gward@[...].org
MEMS Exchange http://www.mems-exchange.org
Attachments:
unknown1
unknown2
Thread:
Magnus Lycka
Greg Ward
Jeremy Hylton
Magnus Lycka
Toby Dickenson
|