django
django copied to clipboard
ticket_32519
Adds a JSONSet Function which can be used in a queryset.update(json_field=JSONSet(field="json_field", fields={"$.hello": Value("world")})
- sqlite supported
- postgresql partially supported
- oracle untested
- mysql/mariadb untested
~~I wasn't able to login via github on the trac website.~~ ( nvm, i had a browser extension turned on )
I'm also wondering where in the code the "__" key and transforms occur, looking into that. Something like this could be wired into json field updates/queries, something akin to RawSQL
and Q
and F
, possibly.
TODO: JSONRemove, less redundant interface on the kwargs
related:
- https://code.djangoproject.com/ticket/32179
- https://code.djangoproject.com/ticket/32519
Hello @allen-munsch! Thank you for your contribution 💪
As it's your first contribution be sure to check out the patch review checklist.
If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!
If you have any design or process questions then you can ask in the Django forum.
Welcome aboard ⛵️!
@allen-munsch Thanks :+1: Feel-free to send a new PR, if you find time to keep working on this.
Closing due to inactivity.
@felixxm Thanks for the reminder on this one. If I can find some time, I'll do that.