Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2024-01-26 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Simon Charette):

 Another one relating to aggregation over a union
 https://code.djangoproject.com/ticket/35146
-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d46701041-c903c07f-4d50-4436-b208-0ae7db4abca7-00%40eu-central-1.amazonses.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2023-05-10 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by David Sanders):

 For posterity, another PR related to this topic:
 https://github.com/django/django/pull/16814

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018808e19ccf-ac2c04ae-4d17-44bc-8e00-d2227d10d17c-00%40eu-central-1.amazonses.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2022-01-04 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ayush Joshi):

 * owner:  Ayush Joshi => (none)
 * status:  assigned => new


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.bf25a626f008a36765b4c848b414f5b4%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2022-01-03 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  Ayush
 |  Joshi
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ayush Joshi):

 * owner:  nobody => Ayush Joshi
 * status:  new => assigned


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.96823ec55b0affda90ffe4b10c2f9d8b%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2021-12-13 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dave Johansen):

 * cc: Dave Johansen (added)


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.05b28f812f3a35a7ddb4f8e1d5a50bcb%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2021-07-14 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Paolo Melchiorre):

 * cc: Paolo Melchiorre (added)


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.68848daf056f47e6fb24ab3b9d340778%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2021-06-08 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jameel A.):

 * cc: Jameel A. (added)


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e60233724c9868faae98f74b2aef02e1%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2021-05-31 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Jameel Al-Aziz):

 I believe we have a similar need, but for difference reasons.

 We have a JSONB postgres column and want to `jsonb_array_elements`
 followed by filtering. Because `jsonb_array_elements` expands into a set
 of columns, you cannot apply a `where` clause filter on the function
 column. A simple solution is to use `jsonb_array_elements` in a subquery
 and then filter the resulting subquery.

 Another use case for sub-querying is being able to apply filters on union
 queries. Our actual use case involves both `jsonb_array_elements` and
 `UNION`s.

 A sample query that I'm trying to write with querysets (but so far have
 been unable to) is:
 {{{
 select *
 from (
 select id, jsonb_array_elements(json_data->'some_array') as elem
 from foo as foo1
 union
 select id, jsonb_array_elements(json_data->'other_array') as elem
 from foo as foo2
 ) as foo_w_elems
 where (elem->>'subfield')::int in (
 select id
 from bar
 where expires_at >= CURRENT_TIMESTAMP
 )
 }}}

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.abc772573db3c165544bd5b50299%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2021-05-28 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by John Speno):

 * cc: John Speno (added)


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.8e2fea2c1ccd333aca099503de56d577%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery (was: Using .distinct().order_by() on a queryset produces unexpected results)

2015-03-13 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * type:  Bug => New feature
 * version:  1.7 => master
 * stage:  Unreviewed => Accepted


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.05265836b1e5986592c62371ce5083ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.