Open GoogleCodeExporter opened 9 years ago
*Pay no attention to the production information there!*
My bad- any way I can get those specifics scrubbed post-submit?
Original comment by skillia...@gmail.com
on 22 Oct 2014 at 3:44
Hello? Does anyone even use this?
Original comment by skillia...@gmail.com
on 24 Oct 2014 at 11:59
I think ou cannot. I usually build a dict(). See above:
headers = [header[0] for header in cursor.description]
rows = []
for row in cursor:
rows.append( dict( zip( headers, row ) ) )
Original comment by david.kwast
on 9 Jan 2015 at 1:17
Thanks, but I just made a helper class that caches namedtuple types for every
table queried. Now I can access fields by index and as named attributes (I
have to rename any columns starting with numbers or "_" to "x_" which is pretty
ugly, but eh...).
Original comment by skillia...@gmail.com
on 9 Jan 2015 at 1:28
Original issue reported on code.google.com by
skillia...@gmail.com
on 22 Oct 2014 at 3:40Attachments: