SQL null conversion

A. Lloyd Flanagan alloydflanagan at attbi.com
Mon Jan 27 14:56:12 EST 2003


Martin Maney <maney at pobox.com> wrote in message news:<b11gr9$lk1$1 at wheel2.two14.net>...
> Gerhard H?ring <gerhard.haering at gmx.de> wrote:
 
> Python seems to call it a "specification" whenever some doc reaches the
> "covers 90% of normal usage" state.  Sometimes that's good enough, but
> I suspect it's at the root of a lot of the half-baked reinventions of
> various wheels that litter the vaults... and many more than never
> become that visible.

I can't disagree that the documentation is minimal.  Some real-world
code samples would help tremendously.
I think the answer to your question can be found in the PEP -- look at
the "paramstyle" attribute.
Apparently the portable way to do parameters is to query the
paramstyle attribute and put your query together using the appropriate
style.  The alternative would be to have all the drivers support a
'standard' form of parameters, and convert to the database-specific
one on the fly.  Maybe in DBAPI 3.0.




More information about the Python-list mailing list