[sqlalchemy] Re: How do you get the underlying sql (without executing it) from a Statement or a compiled_statement?

2007-04-30 Thread Gaetan de Menten
Just use print your_statement_variable Or, if you need it in a variable: str(your_statement_variable) should do the trick. On 4/30/07, vinjvinj [EMAIL PROTECTED] wrote: Is there any way to have sqlalchemy return the sql that it is going to execute without actually executing it? I'm using

[sqlalchemy] Re: How do you get the underlying sql (without executing it) from a Statement or a compiled_statement?

2007-04-30 Thread vinjvinj
When I print the statement it just prints the query with placeholders for the paramters (and not the actual parameters). I would like to get the actual sql that it is going to execute. Vineet On Apr 30, 10:36 am, Gaetan de Menten [EMAIL PROTECTED] wrote: Just use print