Pregunta

Just wanted to know if it is possible to create database triggers in a MySQL database using web2py's DAL? If not what alternatives are available?

I need some way of linking back to some python code from a trigger that happens in MySQL.

Thanks in advance, nav

¿Fue útil?

Solución

The web2py DAL does not have specific syntax for creating triggers, but you can execute any SQL statements via db.executesql(). As an alternative, the web2py DAL includes its own before and after callbacks, which will work across different database backends.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top