I am attempting to create an audit mixin object that would use a server 
side column trigger to set the updated_at timestamp. Ideally, whenever a 
class inherits from a declarative base and this mixin class, the trigger 
statement would be created after the table is created and dropped prior to 
the table being dropped.

So far, I have my column mixin class, AuditMixin, and I also have added 
classes CreateUpdateAtTrigger and DropUpdateAtTrigger to compile the 
trigger DDL create and drop statements. From here, I am a bit unsure how to 
proceed to mount an event to any table's that use this mixin. Any help for 
specific reference examples would be appreciated. Thanks.


<script 
src="https://gist.github.com/pmart123/b6681e9d9c6ddc92582143e13c1c6941.js";></script>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to