iterbetter object is True even if it is empty when use sqlite3
Bug #179644 reported by
realazy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
Fix Released
|
Medium
|
Anand Chitipothu |
Bug Description
when using sqlite3 as db, the iterbetter object, which is web.query returned, is True even if it is empty.
please fix this, I don't want to list(ib) all the time, many thanks!
Changed in webpy: | |
assignee: | nobody → anandology |
importance: | Undecided → Medium |
milestone: | none → 0.31 |
status: | New → Confirmed |
milestone: | 0.31 → 0.35 |
Changed in webpy: | |
milestone: | 0.35 → 0.33 |
Changed in webpy: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
On Jan 1, 2008 12:12 PM, realazy <email address hidden> wrote:
> Public bug reported:
>
> when using sqlite3 as db, the iterbetter object, which is web.query
> returned, is True even if it is empty.
Unfortunately, sqlite doesn't provide the number of rows in resultset,
so it is impossible to find the length without converting it to list.
But, i guess, it is misleading to return True always. Probably it
should raise an exception, when it can not determine the length.