#28296: Add support for aggregation through subqueries
-------------------------------------+-------------------------------------
Reporter: László Károlyi | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
I looks like someone went ahead [https://github.com/martsberger/django-
sql-utils and implemented] the `AggregateSubquery` API.
I'd like to throw another one into the mix which I believe would be more
suitable than the `AggregateSubquery` and `subquery` kwarg idea; an
`as_subquery()` method that returns a `Subquery` instance. It would offer
a nicer interface through composition and allow encapsulation of most of
the subquery creation logic instead of doing it at `Aggregate` expression
resolving and compiling time. The `as_*` pattern is also coherent with the
`Queryset.as_manager` interface so it shouldn't be completely alien to
most of our users.
--
Ticket URL: <https://code.djangoproject.com/ticket/28296#comment:12>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.e0ddf587de6dce38dbd70f9259e5ddda%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.