#28805: Provide a new database function for RegexpReplace
-------------------------------------+-------------------------------------
               Reporter:  Joey       |          Owner:  nobody
  Wilhelm                            |
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Database   |        Version:  master
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I've created a database function in my own project to utilize
 `REGEXP_REPLACE`, and wanted to contribute it upstream. At a quick glance,
 it appears that this is only available on PostgreSQL and Oracle. So my
 main question would be, which route would be preferable for inclusion?
 Should this be added to the PostgreSQL-specific code and let Oracle
 languish, or would this require the addition of a new feature flag on
 database backends?

 With the former implementation, I have code ready to go. The latter, I
 would definitely want some guidance.

 This is of course all assuming that this feature is desired.

 Here is an example usage:


 {{{#!python
 MyModel.objects.annotate(no_letters=RegexpReplace(F('name'), r'[A-Za-z]+',
 ''))
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28805>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.26165c576b602ebce864eedbb09ccb43%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to