#28333: Filter and subquery for window expressions
-------------------------------------+-------------------------------------
     Reporter:  Mads Jensen          |                    Owner:  Simon
                                     |  Charette
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  window orm filter    |             Triage Stage:  Accepted
  subquery GSoC                      |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 The latest version of the patch now supports filtering against annotations
 masked by the usage of `values` and friends.

 `queryset.filter(dept_max_salary__gte=2000).values("id")` now results in

 {{{#!python
 SELECT "col1" FROM (
     SELECT * FROM (
         SELECT "id" AS "col1", MAX OVER (...) AS "depth_max_salary" FROM
 ...
     ) "qualify" WHERE "dept_max_salary" >= 2000
 ) "qualify_mask"
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28333#comment:27>
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/01070182814c260e-5849c90e-c4e3-4554-8d61-2f2159ba6a5a-000000%40eu-central-1.amazonses.com.

Reply via email to