Opened 13 years ago
Last modified 9 years ago
#16891 closed New feature
Delete/update should return number of rows modified — at Initial Version
Reported by: | Steven Cummings | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Sergey Kolosov, dev@…, Zach Borboa | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Splitting this off from ticket 16549...
Deep in the bowels of django.db the rows modified value from update and delete queries is ignored and discarded. For reasons discussed on ticket 16549, it would sometimes be useful to have access to that value.
Objective of this bug is to passively return rows-modified up through the call-stack and, ultimately, hopefully from each of:
- Model.save()
- Model.delete()
- QuerySet.update()
- QuerySet.delete()
with consideration for transaction control/mgmt.
Note:
See TracTickets
for help on using tickets.