#36473 closed Uncategorized (invalid)
Usage of new tuple_lookups in 5.2
Reported by: | Julien Chaumont | Owned by: | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 5.2 |
Severity: | Normal | Keywords: | tuple_lookups |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
As a part of the composite primary key feature, django 5.2 includes new utilities such as â`TupleIn` or `TupleGreaterThan`. From what I've seen, these helpers can be used on any columns, and not necessarily on composite primary keys. However, they're not mentioned anywhere in âthe documentation.
Can you clarify if they are considered internals, or if they can be considered as part of Django's API?
Change History (3)
comment:2 by , 3 months ago
Resolution: | â invalid |
---|---|
Status: | new â closed |
comment:3 by , 3 months ago
Got it thanks! The actionable outcome would have been to add these helpers to the documentation, but if it's not intended to be public just yet I agree with your conclusion.
Short answer is that tuple lookups are not ready for prime time for anything except usage against composite primary keys as we don't have a way to represent generic composite fields (think of the equivalent of
tuple[Field]
as anoutput_field
) and they make assumptions with regards toNULL
handling (composite primary keys cannot containNULL
values) so they should be considered internal until at least #27351 is fixed (it should be re-opened).Happy to answer your question in more details âon the forum but I'll close now as we don't use this ticket tracker to answer question (it's for actionable units of work).