[sqlalchemy] Audit log client side

8 views
Skip to first unread message

Marco De Felice

unread,
Feb 22, 2008, 2:21:52 PM2/22/08
to sqlal...@googlegroups.com
Hi
I'm thinking about a simple client side table audit with SA. Given the
audit log pattern: http://martinfowler.com/ap2/auditLog.html
wouldn't it be simple to adapt it to a mapped class?
I was thinking of a log() function inside the mapped class that if
called saves data into a second table (could it be in a distinct log
database?) with the same columns + timestamp and current user columns.
Is there a way to automate this function at the orm level without
defining additional mappers?

I'm sorry for the vagueness but I'm really just beginning to explore this.
Thanks all

sdo...@sistechnology.com

unread,
Feb 22, 2008, 2:53:02 PM2/22/08
to sqlal...@googlegroups.com
check MapperExtensions, u have pre+post ins/upd/del hooks there.
u may or may not have a mapper for the log-table.

sdo...@sistechnology.com

unread,
Feb 22, 2008, 2:59:30 PM2/22/08
to sqlal...@googlegroups.com
and, i do have bitemporal pattern implemented at
http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc/timed2/
it is not at all optimized but is correct.
Reply all
Reply to author
Forward
0 new messages