Opened 5 years ago

Closed 5 years ago

#30956 closed New feature (invalid)

Add support for Lower and Upper lookups in RangeField.

Reported by: Dulmandakh Owned by: Dulmandakh
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Range type in PostgreSQL supports lookup using lower or upper bound of a range. See https://www.postgresql.org/docs/current/functions-range.html#RANGE-FUNCTIONS-TABLE

Currently, RangeField has startswith and endswith lookups, but it doesn't support lookup joins, like startswith__gte, due to output_field implementation. So there is a need to add support for lower and upper lookups.

Change History (3)

comment:1 by Dulmandakh, 5 years ago

Owner: changed from nobody to Dulmandakh
Status: newassigned

comment:2 by Dulmandakh, 5 years ago

Can this change be included in 3.0?

comment:3 by Mariusz Felisiak, 5 years ago

Has patch: unset
Resolution: invalid
Status: assignedclosed
Summary: Add support for Lower and Upper lookups in RangeField (PostgreSQL)Add support for Lower and Upper lookups in RangeField.
Version: 3.0master

startswith and endswith on RangeField's support chaining (see tests).

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