質問

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

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top