[ZODB-Dev] experimenting with Standalone ZODB...

Michel Pelletier michel@zope.com
Mon, 22 Oct 2001 13:23:22 -0700


Steve Alexander wrote:
> 
> Christian Robottom Reis wrote:
> 
> > On Thu, 18 Oct 2001, Steve Alexander wrote:
> >
> >
> >>Have you looked into the ZODB's historical revisions feature?
> >>
> >
> > Steve, how does this work? I've overlooked it, it seens? Is there a
> > reference on it in the docs somewhere?
> 
> Hmmm... it seems to be a Zope feature rather than a ZODB feature.

Right. A few months ago I was suprised by this myself.

> Although, the Zope layer appears to be very thin.

It is.

> Take a look in lib/python/OFS/Historical.py in a Zope.
> 
> There are docs in lib/python/Products/OFSP/help/History.stx
> 
> It shouldn't take much to get it to work with plain ZODB.

I agree, although how the interface is exposed will be an issue. 
Currently the persistence of an object is exposed through _p_
attributes, would this be extended?  I think that's fine, altough to
start, I would just expose another module in ZODB that provided methods
you pass a persistent object too::

from ZODB import History

History.getRevision(object, 0)  # current, same as 'object'
History.getRevision(object, 1)  # previous revision
etc...

Of course there are other use cases than the one above.

The decision about how or if to expose that on _p_ can be defered to a
later time.

-Michel