mysql-python with cursor that returns either dicts or tuples?

Gabriel Ambuehl gabriel_ambuehl at buz.ch
Wed Jan 16 10:03:43 EST 2002


-----BEGIN PGP SIGNED MESSAGE-----

Hello,
I'm wondering whether there is any solution to have mysql-python use
a
Cursor class that can return either a dictionary or a tuple since I'd
like to use one single cursor instance in my app but in some places a
tuple is better (for performance reasons) whereas in others, a
dictionary is what's needed.

So something like:

db.execute("myquery")
db.fetchallDict()

db.execute("mybigquery")
db.fetchallTuple()



TIA & best regards,
 Gabriel
 ÐJHÐJH„

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i

iQEVAwUBPEWIQ8Za2WpymlDxAQHi2wgAwO5BkeHH4YJBmogugfQS/7aqjAHId/lz
tfH3tYeUO1X1KuWdRAhWIO+LmxFsQ9Efu18M30e9ZLYlV5I6SlE1N85sMRxdyIde
BqFvYekGFGeu/6ag5IYypKgxF/jMLVdFjzPlU6LU2ej7CgjjS6w/oeKauL4ukcyB
NTGlWrrQ3Q/GIrQiqzo9UTgJxSVy3MRMqWQvHDrScX28TM2ayUVimqn4JgfwRtQ/
WXLuNd3sOH26sr3IRiaZpqAmW/SeV2YovnFvznxeaFQPAa2ANBc2mlSWdJgGV4wd
M8SIOro/AAWKuoj8BqxGfDMidY69A/wUyK0h6xkj5VzFQRhThFpM3w==
=vQv0
-----END PGP SIGNATURE-----





More information about the Python-list mailing list