Opened 11 years ago
Last modified 4 years ago
#23646 closed New feature
query set sql update to change different values by different keys — at Initial Version
| Reported by: | Brillgen Developers | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.9 |
| Severity: | Normal | Keywords: | |
| Cc: | Tom Forbes | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Database backends like Postgresql support doing multiple value update for the same field in different rows using a single update query. Please see this sample below:
http://stackoverflow.com/questions/18797608/update-multiple-rows-in-same-query-using-postgresql
However, such an interface is not exposed via the Django ORM. Would this be accepted as a patch? if so, would a list dictionary with the various fields:values to be updated be a good way to provide the input to ORM
Note:
See TracTickets
for help on using tickets.