Re: [sqlalchemy] sqlalchemy supports INSERT INTO ... (SELECT .. ) ?

2012-03-30 Thread Michael Bayer
its not built in at the moment but there is a recipe in the docs for @compiles http://docs.sqlalchemy.org/en/latest/core/compiler.html#compiling-sub-elements-of-a-custom-expression-construct kind of amazing nobody's yet contributed a patch for this, I show people that recipe for a few years now

Re: [sqlalchemy] sqlalchemy supports INSERT INTO ... (SELECT .. ) ?

2012-03-30 Thread Kent Bower
Thanks for pointing me there. As an aside, the recipe would be more bulletproof if it specified the columns (order). Currently, it assumes sqlalchemy knows the order of the columns in the database, which it may not. Thanks again! On 3/30/2012 6:40 PM, Michael Bayer wrote: its not built in

Re: [sqlalchemy] sqlalchemy supports INSERT INTO ... (SELECT .. ) ?

2012-03-30 Thread Michael Bayer
so many great ideas for the eventual contributor ! ;) ideally it would be a method on insert() itself, table.insert().from(select([...])..., cols=('x', 'y', 'z')) or something like that. Maybe people have suggestions. On Mar 30, 2012, at 6:43 PM, Kent Bower wrote: Thanks for pointing me

Re: [sqlalchemy] sqlalchemy supports INSERT INTO ... (SELECT .. ) ?

2012-03-30 Thread Kent Bower
Yeah, I knew it was a hint... ;) So many great ideas, so little time. :( On 3/30/2012 6:58 PM, Michael Bayer wrote: so many great ideas for the eventual contributor ! ;) ideally it would be a method on insert() itself, table.insert().from(select([...])..., cols=('x', 'y', 'z')) or