Reminder of issue 354: http://code.google.com/p/web2py/issues/detail?id=354

I have never used a select trigger, so I only have vague ideas about how it 
would be useful.

For inserts, a single line is sufficient. For deletes/update, that is not 
true. 

You can look at (todor's fixes to) my implementation to see what a useful 
multi-record update/delete wrapper looks like. I used it for auditing. todor 
used it to make "hard deletes" into "soft deletes" (set a "deleted" mark on 
the record instead of really deleting it).

"before" / "after" triggers are not a good solution in the sense that they 
may need to wrap/modify the actual call, rather than just happen before and 
after it.

"multi tenancy" is a an example of what could be implemented with triggers 
(if it wasn't already built-in): add another condition to 
select/delete/update; another field to insert.

Reply via email to