On Tuesday, November 29, 2016 at 11:04:49 PM UTC+1, Josh Smeaton wrote: > > Adam, are you thinking we should be adding something like > Model.objects.window(), or just allowing Window-type expressions on > backends that have a specific feature flag? Does the compiler need to get > involved at all, or can we handle the full range of window expressions with > the expressions API? >
I'd prefer the expression-api. I think it's more transparent what happens, and unless you're thinking of stating the windows explicitly after FROM/GROUP BY/HAVING, I don't see much reason. I'm fairly new, but it seems to complicate things a lot more to need to write code inside the compiler, unless stricly necessary (supporting grouping sets could be one such example). > Mads, there's nothing that currently handles a list of expressions, and > certainly nothing specific to OrderBy. Your proposed syntax is basically > what would be required `order_by=[ .. ]`. > I actually like the idea of introducing ExpressionList. It would provide a bit more power, such as offering ASC/DESC for each ordering expression. Anyway, I'll work a bit with this, and post some commits in the weekend. ~ Mads -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/b78f508c-b3b2-456c-b88a-ee26dead4aae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.