+
Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Conversation

aminalaee
Copy link
Contributor

Closes #10.

Add Queryset-level delete method:

await Note.objects.filter(completed=True).delete()

Or

await Note.objects.delete(completed=True)

Ideally it would return number of modified rows, it's easy to add .returning() method but at the moment supported sqlite version in python doesn't support RETURNING clauses yet (ref).

Any feedback is appreciated.

@aminalaee aminalaee merged commit 843e503 into encode:master Sep 21, 2021
@aminalaee aminalaee deleted the queryset-level-delete branch September 21, 2021 05:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Queryset-level deletes

1 participant

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