#24767: Add GREATEST and LEAST Query Expressions
-------------------------------------+-------------------------------------
     Reporter:  Ian-Foote            |                    Owner:  Ian-Foote
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

 If you open up a pull request now it'll make it easier for me (and others)
 to provide some feedback inline with the code, even though it's not ready
 yet.

 Tip, check the coalesce() method of the ConcatPair. You'll need to figure
 out the "default" value (by asking the user for it..) if an argument is
 none though.

 Also, sqlite requires at least 2 arguments. If there's only 1 argument
 then it will use the aggregate MAX rather than the function mimicking
 GREATEST. You could silently add a None expression to the list, require a
 minimum of 2 expressions, or error out. But it should be handled some how.

--
Ticket URL: <https://code.djangoproject.com/ticket/24767#comment:7>
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/067.b8e258028347f59c818804438cc4e9ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to