django icon indicating copy to clipboard operation
django copied to clipboard

ticket_32519

Open allen-munsch opened this issue 2 years ago • 1 comments

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

allen-munsch avatar Feb 13 '22 12:02 allen-munsch

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 ⛵️!

github-actions[bot] avatar Feb 13 '22 12:02 github-actions[bot]

@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 avatar Mar 15 '24 09:03 felixxm

@felixxm Thanks for the reminder on this one. If I can find some time, I'll do that.

allen-munsch avatar Mar 15 '24 14:03 allen-munsch