[ZODB-Dev] Feature Request 2381 : Persistent object iterator in Storage
JohnD.Heintz
JohnD.Heintz
Fri, 6 Jul 2001 10:03:07 -0500
Hello all,
Just wanted to share with everyone a feature request I've just logged. =20
Please provide any feedback/criticism.
----------
In order to support bulk database conversion scripts we need to be able t=
o=20
iterate over all the objects in a given Storage.
Please provide some useful way to do this that is defined in BaseStorage.=
py.
Either of two solutions would be fine:
1) Define a callback interface to iterate internally:
class BaseStorage:
def callbackWithPids(self, processPidFunc):
...
this could be optimized per-Storage to only call with valid Pids.
2) Provide a max Pid lookup function to allow external iteration.
class BaseStorage:
def getMaxPid(self):
return self._oid
Then client code could iterate independently.
--=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