Mapping Column Names to results using DBI
Juergen A. Erhard
jae at ilk.de
Wed Jan 19 21:04:53 EST 2000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Timothy" == Timothy Grant <tjg at avalongroup.net> writes:
[SNIP]
Timothy> Lance,
Timothy> Thanks so much for your prompt reply.
Timothy> I guess the above means that the DBI spec *doesn't* call
Timothy> for this behaviour. I actually find that quite
Timothy> surprising, [...]
<aol>Me too</aol>.
That's why I prefer PyGreSQL to the DB-Sig API. PyGreSQL does it just
the way one would expect a language with dictionaries to behave:
db.query("select * from table").dictresult()
returns a list of dictionaries keyed on column names.
The DB-Sig API seems, at least to me, to be doing things in a very
traditional way... I guess that's because most of the DB people are
used to this ugliness <0.3 wink>.
Bye, J
- --
Jürgen A. Erhard eMail: jae at ilk.de phone: (GERMANY) 0721 27326
My WebHome: http://Juergen_Erhard.tripod.com
Mesa - Free OpenGL API (http://www.ssec.wisc.edu/~brianp/Mesa.html)
Win32 has many known work arounds. For example, Linux.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Use Mailcrypt and GnuPG <http://www.gnupg.org/>
iEYEARECAAYFAjiGbUQACgkQN0B+CS56qs1FLACeNL0ucsSodW8nPTadW2TNVkIs
95kAn0TOLg5d64+QFjNqOOtLylmWTx+r
=aPza
-----END PGP SIGNATURE-----
More information about the Python-list
mailing list