ashim
ashim

Reputation: 25570

web2py, How to do SELECT ... FOR UPDATE?

I am learning web2py framework and Database Abstraction Level. I need to do SELECT ... FOR UPDATE statement. Is there way to it in web2py? I have not found answer in the manual

Upvotes: 1

Views: 311

Answers (1)

Anthony
Anthony

Reputation: 25536

db(query).select(..., for_update=True)

Note, if you are using SQLite, this is simulated by wrapping the select and update in a transaction (which locks the entire database, not just the selected records).

Upvotes: 3

Related Questions