Re: [ZODB-Dev] List of references to all objects from ZODB?
by Magnus Lycka other posts by this author
Nov 4 2002 7:45PM messages near this date
Re: [ZODB-Dev] List of references to all objects from ZODB?
|
Re: [ZODB-Dev] List of references to all objects from ZODB?
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@[...].se
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@[...].org
http://lists.zope.org/mailman/listinfo/zodb-dev
Thread:
Magnus Lycka
Greg Ward
Jeremy Hylton
Magnus Lycka
Toby Dickenson
|