[Zope] ZODB: Solutions similar to SQL triggers?
Tres Seaver
tseaver at palladion.com
Fri Sep 12 06:02:17 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Phillip B Oldham wrote:
> On Fri, Sep 12, 2008 at 10:00 AM, Andreas Jung <lists at zopyx.com> wrote:
>> --On 12. September 2008 09:25:14 +0100 Phillip B Oldham
>> <phillip.oldham at gmail.com> wrote:
>>> How would I replicate the benefits of SQL triggers in ZODB?
>> No idea what your particular usecase is but the transaction module provides
>> support for pre- and post-commit hooks beyond the standard DataManager
>> functionality.
>
> Essentially I'm looking to put listeners on certain items which
> trigger updates on other items. For instance, in MySQL I would put a
> trigger on a InnoDB table on insert, which would then insert the same
> data into a number optimised-for-reads MyISAM tables. Another example
> would be to cascade deletes through a schema in MySQL (as it doesn't
> currently have this feature).
>
> I'm simply wondering whether its possible to put a listener on a
> persisted object so that it executes some logic once something
> happens.
At the application level, we ordinarily do this by publishing an event
announcing the object creation / modification / deletion: the database
doesn't handle this stuff at all.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIyj4p+gerLs4ltQ4RAi1OAJ9/HWxKHH4hxLsFaQCe82AYAKaAeQCfYQIr
5JWNqZ9lsNexjvtgBO6eWLY=
=8OmE
-----END PGP SIGNATURE-----
More information about the Zope
mailing list