OK nevermind, do this:
class explain(Executable, ClauseElement):
def __init__(self, stmt, analyze=False):
self.statement = _literal_as_text(stmt)
self.analyze = analyze
# helps with INSERT statements
self.inline = getattr(stmt, 'inline', None)
> On Nov 10, 2014, at 5:16 PM, Michael Bayer <[email protected]> wrote:
>
> i made this change:
>
> text += compiler.process(element.statement, **kw)
>
> can you try that? thanks
>
>
>> On Nov 10, 2014, at 4:32 PM, Jon Nelson <[email protected]> wrote:
>>
>> Using this
>>
>> https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/Explain
>>
>> if I take a select statement, and then produce an insert statement using
>>
>> i = some_table.insert(inline=True).from_select( some_select )
>>
>> and then:
>>
>> e = Explain(i)
>>
>> I can't execute(e) because the statement is rendered with RETURNING
>> (despite the inline=True). What's going on here?
>>
>>
>>
>> --
>> Jon
>> Software Blacksmith
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sqlalchemy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/sqlalchemy.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.