On Tue, Nov 29, 2016 at 6:37 PM Adam Johnson <[email protected]> wrote:

> I'm not sure about that detail atm, I need to review the patch. I just
> think we shouldn't be putting anything in postgres-only land.
>
> On 29 November 2016 at 22:04, Josh Smeaton <[email protected]> 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 agree that this should be behind a database feature and not locked away
in contrib.postgres or with a vendor check. Regarding the specifics, I
haven't had time to dig in to see how difficult it would be to add window
expressions to the expressions API, but that would be the way I'd like to
see it happen. Doing something like Model.objects.window() seems like it
would require getting the compiler involved and be more of a pain trying to
implement the various window expressions for each backend.


> 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=[ .. ]`.
>
>
We (or anyone) could make an ExpressionList class that is essentially an
Expression that is a list of expressions. It would basically be a
Combinable with comma as the connector.

Regards,
Michael Manfre

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAGdCwBt17KQdoR9daBRbDtaOy%2B7tH3a%3D1KJB-bd1sx6CQrQ7PA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to