Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#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:1 by Simon Charette, 3 months ago

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 an output_field) and they make assumptions with regards to NULL handling (composite primary keys cannot contain NULL 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).

Last edited 3 months ago by Simon Charette (previous) (diff)

comment:2 by Simon Charette, 3 months ago

Resolution: invalid
Status: newclosed

comment:3 by Julien Chaumont, 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.

Note: See TracTickets for help on using tickets.
Back to Top