Let's say you have two concurrent processes where each might increment
some integer field in some table row.
If you query first and the increment in memory and then update, you
need to query with_lockmode('update') to avoid the case where both
processes read the same value and the do the same increment.
A simpler method is to use SQL s.a. set field = field+1.

Q: How do you generate such SQL with SA ?

Is there a better method to do it?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to