the PG dialect has only "FOR UPDATE" and "FOR UPDATE NOWAIT" at the moment, easy enough to add more options though it would be helpful if someone could volunteer a patch on it (with tests as always!):
http://www.sqlalchemy.org/trac/ticket/2445 On Mar 21, 2012, at 6:00 AM, Julien Cigar wrote: > Hello, > > I'm using SQLAlchemy 0.7.6 and PostgreSQL 9.0.7 which support a FOR UPDATE > and a FOR SHARE clause to lock selected rows. > I noticed that the .with_lockmode() method of the Query object > (http://docs.sqlalchemy.org/en/latest/orm/query.html?highlight=with_lock#sqlalchemy.orm.query.Query.with_lockmode) > only accepts 'update' for PostgreSQL. Could it be an oblivion .. ? > > (I tried with the .with_lockmode('read'), but it also generates a FOR UPDATE > on PostgreSQL) > > Thank you, > Julien > > -- > No trees were killed in the creation of this message. > However, many electrons were terribly inconvenienced. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@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. > > <jcigar.vcf> -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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.