On Oct 5, 2010, at 4:48 AM, Chris Withers wrote:

> On 04/10/2010 13:16, Mark Erbaugh wrote:
>> If I were doing this in SQL, I would to the first command as
>> 
>> SELECT count(*)
>> FROM period
>> WHERE period.cycle = ?
> 
> Why would you do this first?

I wasn't sure why SA was issuing a "select realperiod from period where 
period.cycle = ?" before deleting the records. I incorrectly assumed that it 
was trying to get the count of records to be deleted.  Michael Bayer pointed 
out that cursor.rowcount was used to get that value and that the code in 
question was used by the session to keep the local (in memory) copy of the data 
up to date.

Mark


-- 
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