#6065: Field Lookup - notin
-------------------------------------------------+--------------------------
Reporter:  RichardH <[EMAIL PROTECTED]>  |       Owner:  nobody          
  Status:  new                                   |   Component:  Database 
wrapper
 Version:  SVN                                   |    Keywords:  NOT IN         
 
   Stage:  Unreviewed                            |   Has_patch:  1              
 
-------------------------------------------------+--------------------------
 Field Lookups include '''IN''' which is the SQL equivalent of:
 {{{
 SELECT ... WHERE id IN (1, 3, 4);
 }}}
 The docs example is:
 {{{
 Entry.objects.filter(id__in=[1, 3, 4])
 }}}
 However, there is no Field lookup for the SQL equivalent of:
 {{{
 SELECT ... WHERE id NOT IN (1, 3, 4);
 }}}
 The attached patch implements '''NOTIN''' shown in the example:
 {{{
 Entry.objects.filter(id__notin=[1, 3, 4])
 }}}
 It works on sqlite, but I haven't tested it extensively. Someone with more
 than my limited understanding of the db code needs to look for possible
 implications.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6065>
Django Code <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