#28621: WHERE NOT EXISTS (... ~ ...) without extra() ?
------------------------------------------+--------------------------------
               Reporter:  Дилян Палаузов  |          Owner:  nobody
                   Type:  Uncategorized   |         Status:  new
              Component:  Uncategorized   |        Version:  1.11
               Severity:  Normal          |       Keywords:  QuerySet.extra
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+--------------------------------
 {{{
 class A(models.Model):
   tag = models.CharField()

 class B(models.Model):
   pattern = models.CharField()
 }}}


 A single query that retrieves all A.tag, not matching B.pattern:

 {{{
 SELECT a.tag FROM app_a as a WHERE NOT EXISTS (SELECT 1 FROM app_b as b
 WHERE a.tag ~ b.pattern);
 }}}

 Is it possibe to write a queryset for this, without .extra and .raw?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28621>
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/057.8c105a2cc1931446173a7694c80ede2a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to