Skip to content
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

1065 Select for update #1085

Merged
merged 7 commits into from
Sep 23, 2024
Merged

1065 Select for update #1085

merged 7 commits into from
Sep 23, 2024

Conversation

dantownsend
Copy link
Member

@dantownsend dantownsend commented Sep 23, 2024

Based off #1065

Resolves #932

I just renamed the method from lock_for to lock_rows.

Originally I thought that lock_for made sense:

await Band.select().lock_for('UPDATE')

But it looked weird when the lock strength wasn't specified (the user doesn't have to specify a lock strength, as it defaults to UPDATE):

await Band.select().lock_for()

It looks better as this:

await Band.select().lock_rows()

@dantownsend dantownsend added the enhancement New feature or request label Sep 23, 2024
@dantownsend dantownsend merged commit d3d0d30 into master Sep 23, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Pessimistic locking: select for update
2 participants