Opened 3 years ago

Closed 3 years ago

Last modified 5 weeks ago

#24031 closed New feature (fixed)

Implement a Case/When expression

Reported by: Josh Smeaton Owned by: Michał Modzelewski
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: 1.8-alpha
Cc: michal.modzelewski@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

#23753 has implemented a set of database functions. Originally it was going to implement a Case/When expression type, but the design and API is harder than the types listed in that ticket. So this one will track the implementation of only Case/When, and once implemented, we'll be able to close off #11305 (finally!)

Michal from the mailing list has a working proof of concept, and is developing his idea. See here: https://groups.google.com/forum/#!topic/django-developers/a5ADv59TkBQ

Change History (8)

comment:1 Changed 3 years ago by Tim Graham

Keywords: 1.8-alpha added
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

comment:2 Changed 3 years ago by Josh Smeaton

Has patch: set
Needs documentation: set
Patch needs improvement: set

comment:3 Changed 3 years ago by Michał Modzelewski

Cc: michal.modzelewski@… added
Owner: changed from nobody to Michał Modzelewski
Status: newassigned

comment:4 Changed 3 years ago by Josh Smeaton

Needs documentation: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 65246de7b1d70d25831ab394c4f4a75813f629fe:

Fixed #24031 -- Added CASE expressions to the ORM.

comment:6 Changed 3 years ago by Simon Charette <charette.s@…>

In 47bdad4e6b3bf70aec0d19d65eeb6a7319ad045a:

Replaced inner functions by class methods.

refs #24031

Thanks to Tim Graham and Michał Modzelewski for the review.

comment:7 Changed 2 months ago by Tim Graham <timograham@…>

In 1dafd8cb:

Refs #24031 -- Added test for When.repr().

comment:8 Changed 5 weeks ago by Tim Graham <timograham@…>

In 5114669f:

Refs #24031 -- Added test for Case and When constructor arguments.

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