id summary reporter owner description type status priority milestone component version severity resolution keywords cc branch changelog apichanges internalchanges 10893 Environment.db_query example should not call fetchall Ryan J Ollos "In Trac 1.0, a call to `Environment.db_query` can be traced to a call to `trac.db.util.ConnectionWrapper.execute` with `readonly=True`, which [/browser/trunk/trac/db/util.py?rev=11321&marks=122#L109 calls fetchall] to return the iterable. Therefore it seems like the example in the documentation for using `Environment.db_query` needs to be updated to remove the call to `fetchall`. This is a pretty minor issue, so I'm not sure it is worth a ticket, but I've been trying to understand when it is necessary to call `fetchall`, and couldn't think of another way to relay the info. I grep'ed the source for instances in which `fetchall` is called in the application code (outside the db layer), and only found 3. The call in [/browser/trunk/trac/upgrades/db21.py?rev=10182&marks=6-7 db21.py] seems unnecessary." defect closed normal database backend normal worksforme documentation