Opened 5 years ago

Closed 2 years ago

Last modified 2 years ago

#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 Mariusz Felisiak)

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)

comment:1 by Mariusz Felisiak, 5 years ago

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.

in reply to:  1 comment:2 by Gustav Eiman, 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 Mariusz Felisiak, 5 years ago

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 by Tapasweni Pathak, 5 years ago

Hello folks: Can I take the ticket?

in reply to:  4 comment:5 by Gustav Eiman, 5 years ago

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.

comment:6 by Mariusz Felisiak, 3 years ago

Owner: Tapasweni Pathak removed
Status: assignednew

comment:7 by Alokik Roy, 3 years ago

Owner: set to Alokik Roy
Status: newassigned

comment:9 by Mariusz Felisiak, 2 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 0acaea13:

[4.1.x] Fixed #30711 -- Doc'd django.contrib.postgres.fields.hstore.KeyTransform().

Backport of 7faf25d682b8e8f4fd2006eb7dfc71ed2a2193b7 from main

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 7faf25d:

Fixed #30711 -- Doc'd django.contrib.postgres.fields.hstore.KeyTransform().

comment:12 by GitHub <noreply@…>, 2 years ago

In cb06f5ef:

Reverted "Fixed #30711 -- Doc'd django.contrib.postgres.fields.hstore.KeyTransform()."

This reverts commit 7faf25d682b8e8f4fd2006eb7dfc71ed2a2193b7. The same
can be achieved with F() so there is no need to expose an extra API.

comment:13 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 02876534:

[4.1.x] Reverted "Fixed #30711 -- Doc'd django.contrib.postgres.fields.hstore.KeyTransform()."

This reverts commit 7faf25d682b8e8f4fd2006eb7dfc71ed2a2193b7. The same
can be achieved with F() so there is no need to expose an extra API.
Backport of cb06f5ef8c80fc6a610db0fc36fb9dc7c625335a from main

comment:14 by Mariusz Felisiak, 2 years ago

Resolution: fixedwontfix
Triage Stage: Ready for checkinUnreviewed

The same can be achieved with F() so there is no need to expose an extra API.

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