Thanks for all the great comments & suggestions :)
The original PR was declined due to inactivity.
A new PR with fixes can be found
here: https://github.com/django/django/pull/7604
On Tuesday, July 5, 2016 at 1:54:15 PM UTC+2, Floris den Hengst wrote:
>
> I investigated the GROUP BY
I investigated the GROUP BY requirements when using an ORDER BY within
these aggregates, but there appear to be none.
Further details can be found in the discussion in Trac:
https://code.djangoproject.com/ticket/26067.
Based on this observation, I went on to create a
PR:
@Josh, thanks for pointing out the Expressions API
I will look into it and see if I can come up with a solution that looks
reasonable (including an investigation into requirements on contributing to
the GROUP BY) and report here / in Trac.
On Monday, March 7, 2016 at 1:14:06 PM UTC+1, Tim
Ticket for JSON_AGG: https://code.djangoproject.com/ticket/26327
On Thursday, January 7, 2016 at 5:45:03 PM UTC-5, Josh Smeaton wrote:
>
> Seems reasonable enough to me. Expressions already support generating an
> ORDER BY clause by calling .asc() or .desc() on them. That'd allow your
>
Seems reasonable enough to me. Expressions already support generating an
ORDER BY clause by calling .asc() or .desc() on them. That'd allow your
proposed API to support:
Model.objects.aggregate(ArrayAgg(some_field, order_by=F('some_field').asc()
))
Or any other expression. Consider that any