[Django] #25367: Allow expressions in .filter() calls

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #25367: Allow expressions in .filter() calls

Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
               Reporter:  akaariai   |          Owner:  nobody
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:  Database   |        Version:  master
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:  Accepted   |      Has patch:  1
    Needs documentation:  1          |    Needs tests:  0
Patch needs improvement:  1          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Expressions in filter calls will allow 3rd party apps to create query
 syntax extensions (for example .filter(F('some_field').lower() ==
 'anssi')) style). In addition, having the ability to use expressions
 everywhere unifies the ORM experience.

--
Ticket URL: <https://code.djangoproject.com/ticket/25367>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.4308f599a5d3896e22dd0157b831e8d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  1.9                  |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * keywords:   => 1.9


--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:1>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.b125a0de4822e42abeac3a0e6e34a940%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  1.9                  |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by adamchainz):

 * cc: me@… (added)


Comment:

 This would also probably allow `extra(where)` to be removed as discussed
 on https://groups.google.com/forum/#!topic/django-developers/FojuU0syO8Y ,
 if expressions with 0 column references are allowed.

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:2>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.fed56f78615b10b9f130b32740311d0b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * keywords:  1.9 =>


Comment:

 As noted on the pull request, there are some problems that can't be solved
 in time for the 1.9 freeze.

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.412ee7428e5d729405b1222ed9d44fb8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  Anssi Kääriäinen     |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Matthew Schinckel):

 I have a [https://github.com/django/django/pull/8119 PR] that addresses
 part of this: being able to have an expression that returns a value with
 an `output_field` of `BooleanField` used in a `.filter()`, or a
 `Case(When(...))` situation.

 Does this address enough of this ticket? Or provide any other suggestions?

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:4>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.676e943d8a55b20a51fb265a003a7b85%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  Anssi Kääriäinen     |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Matthew Schinckel):

 The `.filter(F(x) == 'foo')` syntax doesn't work, and won't without quite
 a bit more work (basically, I think this would require the `__eq__` method
 on  `F` to return a non-boolean, which I think is probably Bad News(tm).)

 I think it can be spelled a different way using `ExpressionWrapper`.

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:5>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.e36da483e9c2a58570c8df0819138a22%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  Anssi Kääriäinen     |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Matthew Schinckel):

 Actually, I'm not sure it can - however, I'm not sure that we actually
 want to support that syntax - does it give anything over `Q(x='foo')`?

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:6>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.94195fefd7c7ecb074bc5b7dd7535399%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Matthew Schinckel):

 * owner:  nobody => Matthew Schinckel
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/25367#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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.0bac8242b1e8d3189fdd6acafbb71393%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Josh Smeaton):

 * cc: josh.smeaton@… (added)
 * stage:  Accepted => Ready for checkin


Comment:

 Supporting boolean expressions is enough for the framework. It will be
 possible for 3rd party libs to support more fluent syntaxes by converting
 algebraic expressions into database expressions, similar to how combinable
 works. Whether or not anyone attempts to do that is neither here nor
 there.

 I think this is a really good change. Having to annotate to filter is not
 just cumbersome, but as you've shown also a large performance hit.

 The docs might need a little bit of work, but I think the code and tests
 are fine.

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:8>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.3232dd796c74f3b83257ce8d26de3201%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * needs_docs:  1 => 0
 * stage:  Ready for checkin => Accepted


Comment:

 After some reviews, the patch is still in progress.

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:9>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.9a9fed017d18df612b37f8d0e3fe85a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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:"f7e9db14bbd39a393260d0a8b44aae80cbb65c81" f7e9db14]:
 {{{
 #!CommitTicketReference repository=""
 revision="f7e9db14bbd39a393260d0a8b44aae80cbb65c81"
 Refs #25367 -- Added test for Exists() lookup rhs.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:10>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5d5f2eb09c91cdacbcff05b6ca4eb5bf%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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=""
 revision="efa1908f662c19038a944129c81462485c4a9fe8"
 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5b5e0436ece6261c1882c0b1fb3e19da%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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:"fff5186d3215e0ba06e47090226169f2230786b0" fff5186d]:
 {{{
 #!CommitTicketReference repository=""
 revision="fff5186d3215e0ba06e47090226169f2230786b0"
 Refs #25367 -- Moved select_format hook to BaseExpression.

 This will expose an intermediary hook for expressions that need special
 formatting when used in a SELECT clause.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:11>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.bb2e3fb0a7280278a5e0502beacc17c9%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * needs_better_patch:  1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:13>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.77159361d4f9a011b36f79b854ab2d72%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#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:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * stage:  Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:14>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.4300df3cf72cd77c2a751a1ffc2abfab%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  Anssi Kääriäinen     |                    Owner:  Matthew
         Type:                       |  Schinckel
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"4137fc2efce2dde48340728b8006fc6d66b9e3a5" 4137fc2e]:
 {{{
 #!CommitTicketReference repository=""
 revision="4137fc2efce2dde48340728b8006fc6d66b9e3a5"
 Fixed #25367 -- Allowed boolean expressions in QuerySet.filter() and
 exclude().

 This allows using expressions that have an output_field that is a
 BooleanField to be used directly in a queryset filters, or in the
 When() clauses of a Case() expression.

 Thanks Josh Smeaton, Tim Graham, Simon Charette, Mariusz Felisiak, and
 Adam Johnson for reviews.

 Co-Authored-By: NyanKiyoshi <[hidden email]>
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:15>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.c296d174721569c0a92910a65089e4c2%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #25367: Allow expressions in .filter() calls

Django
In reply to this post by Django
#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  Anssi Kääriäinen     |                    Owner:  Matthew
         Type:                       |  Schinckel
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

 In [changeset:"d275fd04f3fbb1a6cfa2273feb6cb414ce143b8c" d275fd04]:
 {{{
 #!CommitTicketReference repository=""
 revision="d275fd04f3fbb1a6cfa2273feb6cb414ce143b8c"
 Refs #25367 -- Simplified OrderBy and Lookup by using Case() instead of
 RawSQL() on Oracle.

 Follow up to efa1908f662c19038a944129c81462485c4a9fe8.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:16>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.f4eb579094f16edf140511342c7874fe%40djangoproject.com.