with_for_update sqlalchemy code example
Example 1: with_for_update sqlalchemy
SELECT users.id AS users_id FROM users FOR UPDATE OF users NOWAIT
Example 2: with_for_update sqlalchemy
q = sess.query(User).populate_existing().with_for_update(nowait=True, of=User)