#29482: simplify KeyTransform to always use the 'nested_operator' --------------------------------+-------------------------------------- Reporter: David De Sousa | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 2.0 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 David De Sousa): Replying to [comment:2 Matthew Schinckel]: > Does it need something to do with array elements vs object keys? Or does the postgres nested operator already handle that? `#>>` is a path operator, so it will work also with array indexes, #>> '{2}' would give you the 3rd element of the root array. > > If you had a top-level (and non-nested) JSON array in a field, you'd probably want to stick to a simpler index/operator, I think. As I said before I could agree with this, although I'd vouch for simplicity in the code, using only the path operator makes the code a lot simpler IMHO -- Ticket URL: <https://code.djangoproject.com/ticket/29482#comment:4> 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/063.9a1eac8b1901851597115ead5053bcc1%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.