#27694: Improve documentation of supported lookups on HStore & JSON fields
-----------------------------------------+------------------------
Reporter: melinath | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
[https://docs.djangoproject.com/en/dev/ref/contrib/postgres/fields/ The
documentation of supported lookups on HStore & JSON fields is lacking.]
For example, HStoreField supports `iexact` lookups, but the documentation
has a scary warning implying that this is not the case:
Since any string could be a key in a hstore value, any lookup other
than those listed below will be interpreted as a key lookup.
iexact is not listed below – but neither is contains, which is used
directly ''above'' the scary warning as an example of how "You can chain
other lookups after key lookups". (Actually, contains ''is'' listed below,
but it's a different contains that applies only to the field level and not
to a specific key.)
I suspect that the intended meaning is that ''all'' lookups are supported
after a key lookup, and that the ''first'' lookup on the hstore field must
be a key or one of the special lookups listed below.
JSONField does not mention being able to chain lookups after key lookups
at all - but I can see people using gt and in
[http://www.lexev.org/en/2015/trying-json-combo-django-and-postgresql/ in
blog posts like this]. BUT iexact lookups
[https://code.djangoproject.com/ticket/27693 don't currently work] on
JSONField.
--
Ticket URL: <https://code.djangoproject.com/ticket/27694>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.5be38693df7c5c8b512648e424a71fe4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.