#1807: [patch] union and intersection operating on lists
---------------------------------------------------+------------------------
          Reporter:  [email protected]                  |         Owner:  nobody
            Status:  closed                        |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:  wontfix                       |      Keywords:        
             Stage:  Design decision needed        |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by conchas):

 Hi Jacob,

 I think it's not just a redundant way of doing and/or. In some cases it's
 really necessary.
 1) Imagine you need to sort the results of a query set in a way that
 depends on complex params (where clause). The results that match exact
 text comparison come first and the ones the match a LIKE comparison come
 after. How would you do that without a UNION?

 2) When different aggregation criterias are needed in the queries of a
 union.

 In some cases UNION and INTERSECTIONS are necessary and cannot be re-
 written using only AND and OR. Maybe it's worth to rethink this decision,
 isn't it?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1807#comment:4>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to