#29710: Support simple-style CASE expressions
-------------------------------------+-------------------------------------
Reporter: Tom | Owner: nobody
Forbes |
Type: | Status: new
Uncategorized |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently we only support one variant of the SQL CASE statement:
{{{
CASE WHEN a = 1 THEN 'one' WHEN a = 2 THEN 'two' ELSE '?' END
}}}
There is a simpler version when you just need to do an exact check on a
single value:
{{{
CASE a WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE '?' END
}}}
This may be easier for databases to optimize against, especially if you
are producing large statements with many cases
(https://code.djangoproject.com/ticket/23646)
--
Ticket URL: <https://code.djangoproject.com/ticket/29710>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/046.7f6956c4fde400b97bb801091ca9bab3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.