#32381: Include number of rows matched in bulk_update() return value
-------------------------------------+-------------------------------------
               Reporter:  Chris      |          Owner:  nobody
  Jerdonek                           |
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Database   |        Version:  master
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:  bulk_update
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Currently, `bulk_update()` returns `None`, unlike `update()`, which
 returns
 
[https://docs.djangoproject.com/en/3.2/ref/models/querysets/#django.db.models.query.QuerySet.update
 the number of rows matched].

 It looks like it would be easy to add the same functionality to
 `bulk_update()`  since `bulk_update()` simply calls `update()` repeatedly:
 
https://github.com/django/django/blob/2b4b6c8af0aae8785bc1347cf1be2e8e70fd5ff3/django/db/models/query.py#L568
 I.e. the return values could simply be added and returned.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32381>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.f732165aee159c4d59f6dbd5d81eb468%40djangoproject.com.

Reply via email to