Message146670
Currently, sqlite3 allows rows to be easily returned as ordinary tuples (default) or sqlite3.Row objects (which allow dict-style access).
collections.namedtuple provides a much nicer interface than sqlite3.Row for accessing ordered data which uses valid Python identifiers for field names, and can also tolerate field names which are *not* valid identifiers.
It would be convenient if sqlite3 provided a row factory along the lines of the one posted here:
http://peter-hoffmann.com/2010/python-sqlite-namedtuple-factory.html
(except with smarter caching on the named tuples) |
|
Date |
User |
Action |
Args |
2011-10-31 00:32:25 | ncoghlan | set | recipients:
+ ncoghlan |
2011-10-31 00:32:25 | ncoghlan | set | messageid: <1320021145.59.0.53370875256.issue13299@psf.upfronthosting.co.za> |
2011-10-31 00:32:24 | ncoghlan | link | issue13299 messages |
2011-10-31 00:32:24 | ncoghlan | create | |
|