#9519: Add QuerySet.bulk_delete() that issues only a single SQL query
-------------------------------------+-------------------------------------
Reporter: Tarken | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: database, queryset, | Needs documentation: 0
delete | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by ptone):
Yes - the global signal killer context manager is a bad idea - I was
thinking of the narrow context of limiting test interactions - where it
could be useful - but would be a bad choice for public API.
My only hangup on .values().delete() is that I think of values returning
data - not objects, so should be decoupled (conceptually) from the DB -
and so delete seems to leak back to the DB. That is a statement of my
conceptual consistency issue - not that it wouldn't be a clean way to
implement it on the internals side.
Basically trying to muck with signals enable/disable in any public API is
sticky business. I still think a bulk_delete with lots of warning in the
docs is the simplest way forward - if there is a good way forward at all.
--
Ticket URL: <https://code.djangoproject.com/ticket/9519#comment:20>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.