#32519: Add INSERT/REPLACE/SET/DELETE databases functions for JSONField
-------------------------------------+-------------------------------------
     Reporter:  Baptiste Mispelon    |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 Baptiste, Thanks for the ticket. I don't think we need to support all
 these functions. I would rather focus on using key transforms in
 `QuerySet.update()` to which we can use `JSON_SET()`, e.g.
 {{{
 Article.objects.update(details__headline='new text')
 Article.objects.update(details__authors__0=F('author'))
 }}}
 `JSON_REPLACE()` and `JSON_INSERT()` can be emulated with this API by
 filtering existing/not existing keys (see also similar ticket #30200 for
 `ArrayField`.)

 What do you think?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32519#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.d6832a1e883e1f3b4827ef6fef0b787b%40djangoproject.com.

Reply via email to