[sqlalchemy] getting the actual sql used for a session.execute(sql,subs)

2010-02-11 Thread Chris Withers
Hi All, How can I get the actual sql executed by a: session.execute(sql,subs) ? I tried turning on echo in the engine, but that just shows %s where the substitutions should happen. Is there any way to get the post-substitution sql? (so that you can spot bugs where there have been typos in

Re: [sqlalchemy] getting the actual sql used for a session.execute(sql,subs)

2010-02-11 Thread Wichert Akkerman
On 2010-2-11 12:13, Chris Withers wrote: Hi All, How can I get the actual sql executed by a: session.execute(sql,subs) ? I tried turning on echo in the engine, but that just shows %s where the substitutions should happen. Is there any way to get the post-substitution sql? SQLAlchemy does