#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 Baptiste Mispelon):

 **TL;DR**: I agree with reducing the scope of this ticket to only
 `JSON_SET` and `JSON_REMOVE`
 ----
 I hadn't thought of using key transforms to mimic `JSON_SET`. From a user
 perspective it does seem nicer than the JSON path syntax (could be lack of
 familiarity on my part).

 However I think it would still be worthwhile to have a more low-level
 database function like `JSON_SET` available.
 It would allow some use-cases that can't be expressed as simple key
 transforms: a dynamic key for example, or one that depends on other
 fields.

 As for insert/replace/set, I personally don't really have a usecase for
 distinguishing between them.
 While researching I saw that all 4 db engines made the distinction so I
 figured it must have been useful for //somebody//.
 But that's not a very convincing argument, so I wouldn't be opposed to
 only having `JSON_SET` landed in core.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32519#comment:3>
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.df0d98f5eabd25c2fc1c8e4d791e21f7%40djangoproject.com.

Reply via email to