#36134: Add "ABSENT ON NULL" to JsonArray
-------------------------------------+-------------------------------------
Reporter: john-parton | Owner: (none)
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Old description:
> On all backends except Sqlite and Postgres version 15 and earlier, there
> is an additional clause to the JSON_ARRAY SQL which controls whether SQL
> NULL values are mapped to JSON null values or whether they are omitted.
>
> In sqlite and postgres 15 and earlier, the default behavior is to map
> them, so my initial feature for JsonArray just had that as the only
> behavior without any ability to customize on the richer backends.
>
> It would be nice if there was a simple `on_null` parameter to JSON ARRAY
> to control the behavior.
New description:
On all backends except Sqlite and Postgres version 15 and earlier, there
is an additional clause to the JSON_ARRAY SQL which controls whether SQL
NULL values are mapped to JSON null values or whether they are omitted.
In sqlite and postgres 15 and earlier, the default behavior is to map
them, so my initial feature for JsonArray just had that as the only
behavior without any ability to customize on the richer backends.
It would be nice if there was a simple `on_null` parameter to JSON ARRAY
to control the behavior.
Pull request here: https://github.com/django/django/pull/19097
--
Comment (by john-parton):
Pull Request here:
--
Ticket URL: <https://code.djangoproject.com/ticket/36134#comment:1>
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070194957bcbdb-33ed391e-fe06-408f-a11c-bb075a53f994-000000%40eu-central-1.amazonses.com.