#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): I agree, the ideal solution would be to support JSON paths and partial indexes in the `Index` class, just be aware that -> and ->> return different types, so instead of using the four operators, django could use two, either -> and ->> or #> and #>>, depending on the user's desire. Although if support is added to the `Index` class, this discussion is irrelevant since the index can be created with the same logic the `KeyTransform` classes use, using the -> and ->> operators when dealing with root-level keys and the #> and #>> operators when traversing, this is what I'm doing in a management command that handles the index creation for my use case after I found out about this behavior. -- Ticket URL: <https://code.djangoproject.com/ticket/29482#comment:7> 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.49ead3c392e7bf5d7cb2fd34da56d431%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.