#27429: had to use QuerySet.extra to do WHERE LIKE with arbitrary amount /
placement of wildcard characters
-------------------------------------+-------------------------------------
               Reporter:  Lance      |          Owner:  nobody
  Robertson                          |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:             |        Version:  1.10
  Uncategorized                      |
               Severity:  Normal     |       Keywords:  QuerySet.extra
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 My use case is that I'm trying to find phonetic patterns that rhyme using
 a database I built from the pronunciation dictionary CMUdict

 For example:
  {{{#!python
 Pronunciation.objects.extra(where=["code LIKE '%% - %%__1 - S T __0 D'"])
   }}}
 I want to be able to filter with % and _ wildcards in arbitrary amounts
 and places in the search string beyond just __contains, __startswith, and
 __endswith, and the only way I could figure out how to do it is either to
 use a raw query or .extra - if .extra goes away I hope filter will support
 this behavior!

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

Reply via email to