#25367: Allow expressions in .filter() calls
     Reporter:  Anssi Kääriäinen     |                    Owner:  Matthew
         Type:                       |  Schinckel
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"efa1908f662c19038a944129c81462485c4a9fe8" efa1908f]:
 #!CommitTicketReference repository=""
 Refs #25367 -- Moved Oracle Exists() handling to contextual methods.

 Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
 the following cases.

 1. When part of a SELECT clause.
 2. When part of a ORDER BY clause.
 3. When compared against another expression in the WHERE clause.

 This commit moves the systematic CASE WHEN wrapping of Exists.as_oracle
 to contextual .select_format, Lookup.as_oracle, and OrderBy.as_oracle
 methods in order to avoid unnecessary wrapping.

Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:12>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to