I've been having a clumsy hack at enabling myself to pass a select statement as a value to an insert statement. IE: sa.insert(mytable).values(myothertable.select())

I've got it working in that most basic case, but I'm struggling when the select statement has bindparams. The insert needs to take them, as well as (for some dialects) the column names of the select. The thing is I can work out how to get the bindparams from a compiled statement, and I can work out how to get the column names from a uncompiled statement, but I can't work out how to get both from one or the other. Any hints on this would be appreciated.

Also, I slightly worried that there's an obvious reason why this hasn't been done before. Is there something stupid I'm missing? If anyone's tried patching SA to do this I would greatly appreciate any advice.

Thanks

Ed

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to