[DB-SIG] Controlling return types for DB APIs
Federico Di Gregorio
fog at initd.org
Tue Apr 17 22:12:18 CEST 2007
Il giorno mar, 17/04/2007 alle 13.53 -0400, Michael Bayer ha scritto:
> However i might suggest that this whole thread, "controlling return
> types", perhaps be expanded to include "controlling *input* types and
> return types", since to me (as well as to SQLAlchemy) being able to
> send an arbitrarily-typed python object into a bind parameter is just
> the mirror image of receiving a result column as an arbitrarily-typed
> python object. I think it would be unfortunate if only one half of
> the coin were addressed.
Sure. ;)
The Python->SQL part is perfect for adaptation and, for example, psycopg
has a micro-protocols implementation to help with the adaptation of any
Python object into a valid ISQLQuote one. Why two different systems?
Because transating Python to SQL and SQL to Python are two very
different operations, IMHO.
federico
--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer fog at debian.org
INIT.D Developer fog at initd.org
La felicità è una tazza di cioccolata calda. Sempre. -- Io
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
firmata digitalmente
Url : http://mail.python.org/pipermail/db-sig/attachments/20070417/f47dfed5/attachment.pgp
More information about the DB-SIG
mailing list