#32058: Add count() to RawQuerySet.
-------------------------------------+-------------------------------------
Reporter: jkevingutierrez | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 3.1
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* status: new => closed
* resolution: => wontfix
* type: Uncategorized => New feature
* component: Uncategorized => Database layer (models, ORM)
Comment:
Thanks for this ticket, however `RawQuerySet` doesn't implement all
methods you can use with `QuerySet` and is not intended to do this. We
cannot mirror `QuerySet.count()` because there is no
annotation/aggregation mechanism in `RawQuerySet` and wrapping a raw SQL
(suggested in stack overflow) can be clunky. You can start a discussion on
DevelopersMailingList if you don't agree.
------
Replying to [comment:3 Mahanth kumar]:
> But count() exists in Queryset , Can't we use that ?
No, these are different classes.
--
Ticket URL: <https://code.djangoproject.com/ticket/32058#comment:4>
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/073.581724c9a127b925f47f3c74805d8f48%40djangoproject.com.