[ZODB-Dev] Re: Webkit Threading and ZODB 3.3a2: problems on
Windows
Christian Robottom Reis
kiko at async.com.br
Fri Feb 20 12:36:47 EST 2004
On Fri, Feb 20, 2004 at 10:58:58AM -0500, Casey Duncan wrote:
> > As a sanity check, you might consider calling
> > get_transaction().commit() every time. If there have been no changes,
> > it does no harm. Alternatively, you can call
> > get_transaction().abort() if no changes were intended. A third
> > alternative is to assert that get_transaction()._objects is empty when
> > you made no changes (although that's not a public API.)
>
> Hmm, maybe a get_transaction().ismodifed() method that returned True if
> there were changes made in the transaction would be useful as a public
> API?
>
> Or, a crazier idea, may the transaction object should be iterable (or
> have a method that returns an iterator) of the modified objects in the
> transaction?
Well, I raised this issue a bit back, and right now I'm curious: how do
you find out what objects were modified in subtransactions? If that's
easy to discover, then adding API (is_modified() or whatever) is the
trivial part.
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
More information about the ZODB-Dev
mailing list