[DB-SIG] WHat's the status of DB modules and datetime.py supp ort?
Federico Di Gregorio
fog at initd.org
Fri Jan 2 14:39:01 EST 2004
Il ven, 2004-01-02 alle 17:55, Kevin Jacobs ha scritto:
[snip]
> My above concerns are directed toward adopting a Python-type based method of
> escaping SQL literals based on adding a new magic method (like __sqlrepr__
> or __sqlstr__). I assumed (incorrectly) that this was what Frederico was
> suggesting with his proposal; a topic that has come up many times before and
> one the sources of the "DB-API snob" perception.
i did not. i think __sqlstr__ (name it as you like) is very usefull but
it is not the solution for cross-driver compatibility. (that was my
*wrong* idea about 6 month ago.)
[snip]
> compute the best represent ion of various Python data as SQL literals may
> require an SQL dialect parser and schema introspection. This is why
> mandating a one-size-fits all type mapping solution that naively guarantees
> round-trip data representations is not possible via a simple extension to
> DB-API, or at least I've yet to see a proposal to do it properly.
sorry, but i don't agree here. please, show me a postgresql type that
does not support round trip. i think i can write a wrapper object that
does the round trip correctly for every postgresql type. :)
federico
--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer fog at debian.org
INIT.D Developer fog at initd.org
We should forget about small efficiencies, say about 97% of the
time: premature optimization is the root of all evil. -- D.E.Knuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
Url : http://mail.python.org/pipermail/db-sig/attachments/20040102/4cd115b8/attachment.bin
More information about the DB-SIG
mailing list