[sqlalchemy] a problem recently encountered with the example 'Explain'

2014-11-10 Thread Jon Nelson
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

Re: [sqlalchemy] a problem recently encountered with the example 'Explain'

2014-11-10 Thread Michael Bayer
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 jnel...@jamponi.net wrote: Using this https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/Explain if I take a select statement, and then

Re: [sqlalchemy] a problem recently encountered with the example 'Explain'

2014-11-10 Thread Michael Bayer
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',

Re: [sqlalchemy] a problem recently encountered with the example 'Explain'

2014-11-10 Thread Jon Nelson
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 from