Opened 5 years ago

Closed 5 years ago

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

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by brutasse

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

comment:2 Changed 5 years ago by brutasse

  • Has patch set

Changed 5 years ago by brutasse

Updated patch with Alex's comments

Changed 5 years ago by brutasse

RFC

comment:3 Changed 5 years ago by Alex

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 5 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 5 years ago by jbronn

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

comment:6 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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