Yesterday I was working with some code that needed a "select ... for
update" concept to avoid a race condition.
Adding .with_lockmode('update') works a treat on InnoDB and Postgres,
but for sqlite I end up having to sneak in a "if session.bind.name ==
'sqlite'; session.execute('begin immediate transaction')" before doing
the select.

This seems to work for now, but it feels like cheating.  Better way to
do this?

-clayg

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