I'm fairly sure that SelectResults.__getitem__ is using wrong ops when
asked to retrieve a single object from the "list". As it happens this
only seems to matter with SQLite, possibly due to its different
LIMIT-OFFSET behaviour. See attached patch.
The current code always returns the first row in the results no matter
what index you asked for. Another effect of this is that an IndexError
is never thrown so any loops expecting the exception never end.
I have attached a quick unit test which performs a simple test of
various iteration mechanisms.
- Matt
--
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenation.net
e: ma...@po...
|