📜  sqlalchemy 锁定行 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:10.827000             🧑  作者: Mango

代码示例1
YourModel.query.with_for_update().get(id)

#This locks the row until 
db.session.rollback()
#or
db.session.commit()
#is called