Mapping Column Names to results using DBI

Timothy Grant tjg at avalongroup.net
Wed Jan 19 22:31:55 EST 2000


"Juergen A. Erhard" wrote:

>     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.

I first started working with PyGreSQL (and really liked it, and I still
cobble together small pieces of utility code using it), but couldn't get
it to work right under Windows, plus some of my other project
requirements needed ODBC, so I went with an ODBC interface.
 
> 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>.

I don't know how the sig works, but I just filled out a PSA membership
form so I could allow the DB-Sig the benefit of my great storehouse of
cluelessness!

-- 
Stand Fast,
    tjg.

Chief Technology Officer              tjg at exceptionalminds.com
Red Hat Certified Engineer            www.exceptionalminds.com
Avalon Technology Group, Inc.                   (503) 246-3630
>>>>>>>>>>>>EXCEPTIONAL MINDS, INNOVATIVE PRODUCTS<<<<<<<<<<<<




More information about the Python-list mailing list