[ZODB-Dev] List of references to all objects from ZODB?

Magnus Lycka magnus@thinkware.se
Mon, 04 Nov 2002 20:45:07 +0100


At 12:44 2002-11-04 -0500, Jeremy Hylton wrote:
>Can't you just use all the _index attribute of the FileStorage?  If
>the oid isn't in _index, there's no way FileStorage is going to load
>it.  It seems more efficient to use the list of known oids than to do
>a has_key() for every possible oid.

Actually, I would have used it for other things as well, a long
time ago, if I had only known that it existed! :) Thanks Jeremy.
(I'm still waiting for O'Reilly to publish ZODB in a Nutshell.)

So, the key fields in storage._index are OIDs, and the values are...?

Does other storages have this attribute as well?

Now there is one major thing that I've never managed to figure
out. How do I get from OID to object reference or vice versa?


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se