#33015: QuerySet.extra Use Case: filtering on large lists of tuples
-------------------------------------+-------------------------------------
     Reporter:  kris-swann           |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  QuerySet.extra,      |             Triage Stage:  Accepted
  Documentation                      |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by john-parton):

 I believe this might be possible on current main, due to this pull
 request:
 
https://github.com/django/django/commit/1eac690d25dd49088256954d4046813daa37dc95

 I haven't tested it, but I believe


 {{{
 ExampleModel.objects.alias(
     composite_key=Tuple("val1", "val2")
 ).filter(composite_key__in=items_to_fetch)
 }}}

 might actually work now and produce the desired SQL.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/33015#comment:8>
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/010701916bbf4e9f-ebf9d94a-3152-4f10-8964-ae59fef194b7-000000%40eu-central-1.amazonses.com.

Reply via email to