#34940: Filter queryset on "tuples" of values for multiple columns
-------------------------------------+-------------------------------------
Reporter: Xavier Blanchot | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: Filter | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
FWIW [https://forum.djangoproject.com/t/multiple-columns-using-mysql-in-
clause/24488 this was recently discussed on the forums] and it feels
closely related to #373 so I don't think it warrants further discussion;
we know we want to support composite columns fields.
The good news is that [https://github.com/django/django/pull/17279 this is
being actively worked on] so you should eventually be able to do something
like
{{{#!python
Foo.objects.filter(
lookups.CompositeIn(
expression.ExpressionTuple("a", "b"), # This would have an
output_field=CompositeField()
tuples,
)
)
}}}
or even eventually
{{{#!python
Foo.objects.alias(ab=("a","b")).filter(ab__in=tuples)
}}}
If allow tuples to be used as shorthands for expression tuples.
--
Ticket URL: <https://code.djangoproject.com/ticket/34940#comment:2>
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/0107018b90d07433-c548732b-12de-443a-91e2-0f01b3dd4d3d-000000%40eu-central-1.amazonses.com.