+
Skip to content

queryset-level update method #112

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

Merged
merged 1 commit into from
Sep 22, 2021

Conversation

aminalaee
Copy link
Member

Closes #9

You can update instances by calling .update() on a queryset:

await Note.objects.filter(completed=True).update(completed=False)

It's not very common, but to update all rows in a table:

await Note.objects.update(completed=False)

@aminalaee aminalaee merged commit dc93180 into encode:master Sep 22, 2021
@aminalaee aminalaee deleted the queryset-level-update-method branch September 22, 2021 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Queryset-level updates
1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载