[ZODB-Dev] Find references to an object
JohnD.Heintz
JohnD.Heintz
Wed, 8 Aug 2001 15:34:46 -0500
Won't the self-packing and garbage collecting variant of BerkeleyStorage=20
maintain this info? Trade space for time and all that.
John
On Wednesday 08 August 2001 15:15, Jeremy Hylton wrote:
> >>>>> "GW" =3D=3D Greg Ward <gward@mems-exchange.org> writes:
>
> GW> ZODB gurus -- given an OID, is it possible to find all objects
> GW> that reference that object?
>
> I don't believe any storage has a feature like this. A storage only
> needs to know about the other direction to do GC.
>
> GW> Perhaps what I'm looking for is this: a sneaky, underhanded way
> GW> to load object A, find the list of all objects (OIDs) it
> GW> references, and see if object B is in that list. If so, add
> GW> object A to the list of objects referencing B. Repeat
> GW> database.objectCount() times. The problem I see with this is
> GW> how to deal with extension types like BTree, which reference
> GW> lots of objects in an opaque way.
>
> GW> Any suggestions?
>
> If you have objects A and B, it should be possible to get a list of
> everything referenced by A and see if B is in that list.
>
> Jeremy
>
>
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
>
> ZODB-Dev mailing list - ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
--=20
=2E . . . . . . . . . . . . . . . . . . . . . . .
John D. Heintz | Senior Engineer
1016 La Posada Dr. | Suite 240 | Austin TX 78752
T 512.633.1198 | jheintz@isogen.com
w w w . d a t a c h a n n e l . c o m