THerp@apriori.de wrote:
Hi,
is there any chance that Zope/ZODB will distinguish between the datetime an object is saved (bobobase_modification_time) and the datetime it was actually changed?
There is absolutely no chance of this. The reason, of course, is that there is no way for the ZODB to know what changes are meaningful. The right way to track meaningful application events is to do so at the application level.
For example, Zope 3 tracks creation and modification times that have nothing to do with database time stamps. It's up to application code to publish IObjectCreatedEvents and IObjectModifiedEvents. There are subscribers for these events that record the times of the events in Dublin-Core meta-data elements that can be queried by application code.
Note that I'm copying zope3-dev and zope-dev who might find this interesting.
Jim
Jim Fulton wrote:
For example, Zope 3 tracks creation and modification times that have nothing to do with database time stamps.
I agree. Is there any reason for ZODB to actually keep timestamps rather than just use serial version ids?
(I understand calls to get the system tiem are expensive, incrementing an integer number by one should be somewhat less expensive...)
cheers,
Chris
I agree. Is there any reason for ZODB to actually keep timestamps rather than just use serial version ids?
Most storages need a timestamp anyway for time-related packing.
(I understand calls to get the system tiem are expensive, incrementing an integer number by one should be somewhat less expensive...)
No more expensive than any other OS call. ZODB currently uses only a few calls to time() per transaction, so there is little to be saved.