[ZODB-Dev] Feature Request 2381 : Persistent object iterator in Storage

JohnD.Heintz JohnD.Heintz
Fri, 6 Jul 2001 16:29:07 -0500


By Pid I mean _p_oid, sorry for being ambiguous.

How did you implement get_database().objectCount() ?

The only way I could find is the _oid attribute of BaseStorage.

John

On Friday 06 July 2001 16:00, Greg Ward wrote:
> On 06 July 2001, John D. Heintz said:
> > Just wanted to share with everyone a feature request I've just logged=
=2E
> > Please provide any feedback/criticism.
> >
> > ----------
> > In order to support bulk database conversion scripts we need to be ab=
le
> > to iterate over all the objects in a given Storage.
> >
> > Please provide some useful way to do this that is defined in
> > BaseStorage.py.
>
> Yes, I would like to see an official API for this too.  I'll attach a
> script I wrote to walk over an entire ZODB by incrementing OIDs.  It's
> more interesting than useful, but it *is* interesting.  ;-)  It won't
> work out-of-the-box because it relies on our init_database(),
> get_connection(), and get_database() utility routines.  Exercise for th=
e
> reader, etc. etc.
>
> (BTW, when you say "Pid", do you really mean "OID"?  Or am I missing
> something?)
>
>         Greg

----------------------------------------
Content-Type: text/plain; charset=3D"us-ascii"; name=3D"Attachment: 1"
Content-Transfer-Encoding: 7bit
Content-Description:=20
----------------------------------------

--=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