John Parton
John Parton
Ah, my test to check for double-cast doesn't work because I had assumed the cast syntax would always be the postgres-specific one. Egg on face. Does anyone have a better...
~~Noticed something interesting.~~ ~~On the SQLite backend, double-casts end up elided in the final SQL, but on postgres, they're present.~~ ~~For example~~ ~~`Cast(Cast("age", output_field=CharField()), output_field=CharField())`~~ ~~Results in~~ ~~`("age"::varchar)::varchar` on postgres...
Updated tests so the check for double-cast only runs only postgres (no other backend needs to wrap items in casts). Black/isort/push
> I feel like `jsonb_array_elements` was also discussed in the ticket - was it decided not to add this? So I left it out for for a few reasons: 1....
Changed. It's good practice for me.
Just adding a root comment here as well. I've rebased against main: * Moved class to new `json` module * Shuffled documentation around * Added a release note * Tweaked...
Unchecked the `needs documentation` checkbox in Trac.
> Thank you for the updates - can you also move the test files to `tests/db_functions/json`? 🙏 Done. I ran a quick `./runtests.py --settings test_postgres db_functions.json` to confirm everything's still...
I applied most of the suggestions using Github, pulled it all down, cleaned up things (mostly black) and made some minor required tweaks. Rebased, ran tests locally, force pushed.
The current issue on the `code.djangoproject.com` is flagged as `wontfix`, so I believe this likely should be closed. @charettes If you have some time, would you mind weighing in? https://code.djangoproject.com/ticket/36139#comment:9...