Opened 15 years ago

Closed 15 years ago

Last modified 13 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é 15 years ago.
Patch adds indexing w/ tests and a mention in the docs
12806-2.patch (3.1 KB ) - added by Bruno Renié 15 years ago.
Updated patch with Alex's comments
12806-3.patch (3.1 KB ) - added by Bruno Renié 15 years ago.
RFC

Download all attachments as: .zip

Change History (9)

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

by Bruno Renié, 15 years ago

Attachment: 12806.patch added

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

comment:2 by Bruno Renié, 15 years ago

Has patch: set

by Bruno Renié, 15 years ago

Attachment: 12806-2.patch added

Updated patch with Alex's comments

by Bruno Renié, 15 years ago

Attachment: 12806-3.patch added

RFC

comment:3 by Alex Gaynor, 15 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by jbronn, 15 years ago

Resolution: fixed
Status: newclosed

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

comment:5 by jbronn, 15 years ago

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

comment:6 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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