#30711 closed Cleanup/optimization (wontfix)
Document django.contrib.postgres.fields.hstore.KeyTransform.
Reported by: | Gustav Eiman | Owned by: | Alokik Roy |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | HStoreField F |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Document django.contrib.postgres.fields.hstore.KeyTransform
in the HStoreField documentation that can be used on the right hand side of a filter or an annotation.
Change History (14)
follow-up: 2 comment:1 by , 5 years ago
Version: | 2.2 → master |
---|
comment:2 by , 5 years ago
Replying to felixxm:
Thanks for the report, I don't think that we should support this by adding a custom expression because currently you can always use
django.contrib.postgres.fields.hstore.KeyTransform
, e.g.
Person.objects.annotate(height=KeyTransform('height', 'attributes'))I don't think that we need to add anything new. IMO, documentating
django.contrib.postgres.fields.hstore.KeyTransform
should be enough.
It's more complicated for JSONField because nesting multiple
KeyTransform()
is not so handy.
Thank you! I agree, I had no idea this was available.
Being a first time poster, what do I do now? Should I close this ticket?
comment:3 by , 5 years ago
Component: | contrib.postgres → Documentation |
---|---|
Description: | modified (diff) |
Owner: | set to |
Summary: | Add HStoreF for F object like querying on HStoreField. → Document django.contrib.postgres.fields.hstore.KeyTransform. |
Triage Stage: | Unreviewed → Accepted |
Type: | New feature → Cleanup/optimization |
I changed ticket description, thanks!
comment:5 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Replying to tapaswenipathak:
Hello folks: Can I take the ticket?
That would be great! I'll assign it to you.
comment:6 by , 3 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:7 by , 2 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:9 by , 2 years ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:14 by , 2 years ago
Resolution: | fixed → wontfix |
---|---|
Triage Stage: | Ready for checkin → Unreviewed |
The same can be achieved with F()
so there is no need to expose an extra API.
Thanks for the report, I don't think that we should support this by adding a custom expression because currently you can always use
django.contrib.postgres.fields.hstore.KeyTransform
, e.g.I don't think that we need to add anything new. IMO, documentating
django.contrib.postgres.fields.hstore.KeyTransform
should be enough.It's more complicated for JSONField because nesting multiple
KeyTransform()
is not so handy.