[sqlalchemy] Result of a table.update()

2010-10-21 Thread Warwick Prince
Hi All I'm using 0.6.4 under Windoze with MySQL, Python 2.6.4 and I had code that I thought worked before (0.6.3) - which appeared to break due to this issue.. I could be wrong on this point so I'll just get to the crux of the matter... I have a result = table.update(whereClause,

Re: [sqlalchemy] Result of a table.update()

2010-10-21 Thread Michael Bayer
an UPDATE statement returns no rows unless RETURNING was used to return columns from those rows that were updated. When an UPDATE or DELETE is emitted, result.rowcount contains the number of rows that were matched by the statement's criterion. On Oct 21, 2010, at 2:06 AM, Warwick Prince

Re: [sqlalchemy] Result of a table.update()

2010-10-21 Thread Warwick Prince
HI Michael Thanks for the info. .rowcount was the missing link I needed. I'll also play with RETURNING as well as I thought I had tried that at one stage and saw no change in the SQL emitted, so moved on. I'll let you know. Cheers Warwick an UPDATE statement returns no rows unless