Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12806 closed (fixed)

Implement __getitem__ on RawQuerySet

Reported by: vbabiy Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2-beta
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Would be a nice shortcut to get one result back, especially if your SQL has a limit 1. Other wise you have to call list on it and then grab that element.

Attachments (3)

12806.patch (3.2 KB) - added by Bruno Renié 7 years ago.
Patch adds indexing w/ tests and a mention in the docs
12806-2.patch (3.1 KB) - added by Bruno Renié 7 years ago.
Updated patch with Alex's comments
12806-3.patch (3.1 KB) - added by Bruno Renié 7 years ago.
RFC

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

Changed 7 years ago by Bruno Renié

Attachment: 12806.patch added

Patch adds indexing w/ tests and a mention in the docs

comment:2 Changed 7 years ago by Bruno Renié

Has patch: set

Changed 7 years ago by Bruno Renié

Attachment: 12806-2.patch added

Updated patch with Alex's comments

Changed 7 years ago by Bruno Renié

Attachment: 12806-3.patch added

RFC

comment:3 Changed 7 years ago by Alex Gaynor

Triage Stage: AcceptedReady for checkin

comment:4 Changed 7 years ago by jbronn

Resolution: fixed
Status: newclosed

(In [12504]) Fixed #12806 -- Added an implementation of RawQuerySet.__getitem__. Thanks, Bruno Renié.

comment:5 Changed 7 years ago by jbronn

(In [12508]) Updated patch applied in r12504. Refs #12806.

comment:6 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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