Re: [sqlalchemy] Connection events don't work on connection objects?

2012-06-17 Thread Michael Bayer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There's a patch attached to http://www.sqlalchemy.org/trac/attachment/ticket/2511/ that does most of it now, in case you want to play with it. Still some glitches need to be ironed out, though. On Jun 17, 2012, at 9:31 AM, Michael Bayer wrote: >

Re: [sqlalchemy] Connection events don't work on connection objects?

2012-06-17 Thread Michael Bayer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 unfortunately that is the case for now. the event system doesn't actually have the capability for one class of events to be associated with more than one type of parent class. it will be a non-trivial task to get both Engine and Connection to ac

[sqlalchemy] Connection events don't work on connection objects?

2012-06-17 Thread Fayaz Yusuf Khan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This code fails:- from sqlalchemy import event, create_engine def before_execute(conn, clauseelement, multiparams, params): log.info("Received statement: %s" % clauseelement) engine = create_engine('mysql://root@localhost') connection = engine.c