[sqlalchemy] Audit log client side

8 vues
Accéder directement au premier message non lu

Marco De Felice

non lue,
22 févr. 2008, 14:21:5222/02/2008
à 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

non lue,
22 févr. 2008, 14:53:0222/02/2008
à 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

non lue,
22 févr. 2008, 14:59:3022/02/2008
à 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.
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message