[sqlalchemy] Re: Doing a dynamic Update

2008-01-16 Thread Mike
Rick, On Jan 15, 1:34 pm, Rick Morrison [EMAIL PROTECTED] wrote: Two issues: a) You need to give SA a table definition for the table you're trying to update. b) You need to specify the name of the column to update in the dict(), not the string 'key' I've updated the script to work by

[sqlalchemy] Re: Doing a dynamic Update

2008-01-15 Thread Mike
Rick, On Jan 10, 7:02 pm, Rick Morrison [EMAIL PROTECTED] wrote: For a stepwise migration from raw, SQL, it will probably be easier to get your mind around the SQL-expression side of the library, and then adopt ORM features as you feel comfortable with them. On the SQL-expression side of

[sqlalchemy] Re: Doing a dynamic Update

2008-01-15 Thread Rick Morrison
Hey Mike You don't need to go through that. Just populate the dictionary used for the execute() with the appropriate column name as the key, and you're good to go. On Jan 15, 2008 10:05 AM, Mike [EMAIL PROTECTED] wrote: Rick, On Jan 10, 7:02 pm, Rick Morrison [EMAIL PROTECTED] wrote: For

[sqlalchemy] Re: Doing a dynamic Update

2008-01-15 Thread Mike
On Jan 15, 9:20 am, Rick Morrison [EMAIL PROTECTED] wrote: Hey Mike You don't need to go through that. Just populate the dictionary used for the execute() with the appropriate column name as the key, and you're good to go. On Jan 15, 2008 10:05 AM, Mike [EMAIL PROTECTED] wrote:

[sqlalchemy] Re: Doing a dynamic Update

2008-01-15 Thread Rick Morrison
Two issues: a) You need to give SA a table definition for the table you're trying to update. b) You need to specify the name of the column to update in the dict(), not the string 'key' I've updated the script to work by passing in both the column name to update and the update value to use. I've

[sqlalchemy] Re: Doing a dynamic Update

2008-01-10 Thread Rick Morrison
For a stepwise migration from raw, SQL, it will probably be easier to get your mind around the SQL-expression side of the library, and then adopt ORM features as you feel comfortable with them. On the SQL-expression side of the library, you'll find that your Table() object has a collection called