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 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 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 :) >> >> >> On Mar 30, 2012, at 6:05 PM, Kent wrote: >> >>> Couldn't find answer in docs, does sqlalchemy support: >>> >>> INSERT INTO ... (SELECT .. ) >>> >>> instead of >>> >>> INSERT INTO ... VALUES... >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "sqlalchemy" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/sqlalchemy/-/IIxzN-i9740J. >>> To post to this group, send email to sqlalchemy@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. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To post to this group, send email to sqlalchemy@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. > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@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. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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.