-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pessimistic locking: select for update #932
Comments
Abdelhadi92
changed the title
Pessimistic locking
Pessimistic locking: select for update
Feb 25, 2024
It's not currently possible, but I think it would be pretty simple to add. We could add something like a https://www.postgresql.org/docs/current/sql-select.html#SQL-FOR-UPDATE-SHARE await MyTable.select(lock_strength='UPDATE') I'm not certain on the best API for it yet, but something like that should work. |
I guess this one is an absolute must have. Any updates on it? |
Merged
Implemented by #1085 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to lock an object in the database in order to prevent other transactions from modifying the same record. Within the Postgres such a lock should be done using the SELECT FOR UPDATE query.
How I can do this using Piccolo?
you can find it out in Django here and in Pony here
The text was updated successfully, but these errors were encountered: