Opened 12 months ago

Last modified 12 months ago

#30711 assigned Cleanup/optimization

Document django.contrib.postgres.fields.hstore.KeyTransform.

Reported by: Gustav Eiman Owned by: Tapasweni Pathak
Component: Documentation Version: master
Severity: Normal Keywords: HStoreField F
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by felixxm)

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 (5)

comment:1 Changed 12 months ago by felixxm

Version: 2.2master

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.

comment:2 in reply to:  1 Changed 12 months ago by Gustav Eiman

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 Changed 12 months ago by felixxm

Component: contrib.postgresDocumentation
Description: modified (diff)
Owner: set to nobody
Summary: Add HStoreF for F object like querying on HStoreField.Document django.contrib.postgres.fields.hstore.KeyTransform.
Triage Stage: UnreviewedAccepted
Type: New featureCleanup/optimization

I changed ticket description, thanks!

comment:4 Changed 12 months ago by Tapasweni Pathak

Hello folks: Can I take the ticket?

comment:5 in reply to:  4 Changed 12 months ago by Gustav Eiman

Owner: changed from nobody to Tapasweni Pathak
Status: newassigned

Replying to tapaswenipathak:

Hello folks: Can I take the ticket?

That would be great! I'll assign it to you.

Note: See TracTickets for help on using tickets.
Back to Top