Opened 8 years ago

Last modified 8 years ago

#18631 new New feature

A way to get handle to the generated query for terminal queryset methods

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When debugging or testing generated ORM queries it is often useful to get a handle to generated queryset from terminal qs methods (like .update() or .aggregate()) instead of executing the query.

The attached proof-of-concept shows a way to achieve this.

Attachments (1)

ticket_18631_poc.diff (2.7 KB) - added by Anssi Kääriäinen 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Anssi Kääriäinen

Attachment: ticket_18631_poc.diff added

comment:1 Changed 8 years ago by Jason Mayfield

Cc: jason@… added
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 8 years ago by Jason Mayfield

Cc: jason@… removed
Triage Stage: Design decision neededUnreviewed

comment:3 Changed 8 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedAccepted

I am marking this as accepted.

I am not sure if the attached patch is the right way to do this. But some way to do this would be nice for debugging purposes.

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