Opened 9 years ago

Closed 9 years ago

Last modified 7 years 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: dev
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 by Tim Graham, 9 years ago

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

comment:2 by Josh Smeaton, 9 years ago

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

comment:3 by Michał Modzelewski, 9 years ago

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

comment:4 by Josh Smeaton, 9 years ago

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

comment:5 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 65246de7b1d70d25831ab394c4f4a75813f629fe:

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

comment:6 by Simon Charette <charette.s@…>, 9 years ago

In 47bdad4e6b3bf70aec0d19d65eeb6a7319ad045a:

Replaced inner functions by class methods.

refs #24031

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

comment:7 by Tim Graham <timograham@…>, 7 years ago

In 1dafd8cb:

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

comment:8 by Tim Graham <timograham@…>, 7 years ago

In 5114669f:

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

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