summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-07-26 20:21:27 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-07-26 20:22:03 +0200
commit265c3eb60287d7ba644a7796a79675b8c0d627ca (patch)
tree3db0e801f57f723dae6b1b5f7a9b38f33a7e5640 /docs/ref
parent1fd79033f7835c9755f77cb934927c7fd0079da5 (diff)
[4.1.x] Fixed #33820 -- Doc'd "true"/"false"/"null" caveat for JSONField key transforms on SQLite.
Thanks Johnny Metz for the report. Regression in 71ec102b01fcc85acae3819426a4e02ef423b0fa. Backport of e20e5d1557785ba71e8ef0ceb8ccb85bdc13840a from main
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index a9da1dcf7e..641ef0dd79 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -712,6 +712,14 @@ You can also refer to fields on related models with reverse relations through
pronounced if you include multiple such fields in your ``values()`` query,
in which case all possible combinations will be returned.
+.. admonition:: Special values for ``JSONField`` on SQLite
+
+ Due to the way the ``JSON_EXTRACT`` and ``JSON_TYPE`` SQL functions are
+ implemented on SQLite, and lack of the ``BOOLEAN`` data type,
+ ``values()`` will return ``True``, ``False``, and ``None`` instead of
+ ``"true"``, ``"false"``, and ``"null"`` strings for
+ :class:`~django.db.models.JSONField` key transforms.
+
``values_list()``
~~~~~~~~~~~~~~~~~
@@ -782,6 +790,14 @@ not having any author::
>>> Entry.objects.values_list('authors')
<QuerySet [('Noam Chomsky',), ('George Orwell',), (None,)]>
+.. admonition:: Special values for ``JSONField`` on SQLite
+
+ Due to the way the ``JSON_EXTRACT`` and ``JSON_TYPE`` SQL functions are
+ implemented on SQLite, and lack of the ``BOOLEAN`` data type,
+ ``values_list()`` will return ``True``, ``False``, and ``None`` instead of
+ ``"true"``, ``"false"``, and ``"null"`` strings for
+ :class:`~django.db.models.JSONField` key transforms.
+
``dates()``
~~~~~~~~~~~