Now the statement doesn't render with RETURNING, however I still get this:
AttributeError: 'Explain' object has no attribute '_returning'
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails fro
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',
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 wrote:
>
> Using this
>
> https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/Explain
>
> if I take a select statement, and then produce an insert
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 wit