MySQLdb where's fetchoneDict()?
gh_pythonlist at gmx.de
Sun Sep 30 15:27:19 CEST 2001
On Sun, Sep 30, 2001 at 02:44:05PM +0200, Gerhard Häring wrote:
> I'd probably subclass the cursor class to have the desired behaviour, i.
> e. a fetchoneDict() method that only uses stuff from the DB-API. That's
> not too difficult, it would only involve cursor.fetchone() and
> cursor.description. Then you'd need to subclass the Connection class to
> return an instance of your subclassed Cursor class instead.
Ugh. In reality, this gets uglier than I thought. Which probably means
that the idea wasn't really that good.
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 240 bytes
Desc: not available
More information about the Python-list