[DB-SIG] Type code mappings: expanding the type objects
Andy Todd
andy47 at halfcooked.com
Fri Jan 9 15:34:24 EST 2004
M.-A. Lemburg wrote:
> Federico Di Gregorio wrote:
>
>> Il gio, 2004-01-08 alle 12:54, M.-A. Lemburg ha scritto:
>> [snip]
>>
>>> Add fields to .description is problematic. Applications tend
>>> to use tuple unpacking to access the tuples in that list and
>>> adding fields would break this.
>>
>>
>> mm.. you're right. but encoding information is something that i would
>> like to see in DBAPI 2.1 or 3.0.
>
>
> Depends on what you mean with "encoding information" :-)
>
> Typically you have a database encoding that the database uses
> to store text data. The encoding then applies to all data and
> thus all columns in the result set, so you would put such
> information on the connection as .encoding attribute.
>
Just a word of warning, some databases (specifically SQL Server) allow
you to specify the encoding at a more granular level than the database.
In SQL Server it can be defined at the column, table or database
(schema) level. Whilst it could be an attribute of the connection this
may not be specific enough.
Regards,
Andy
--
--------------------------------------------------------------------------------
From the desk of Andrew J Todd esq - http://www.halfcooked.com/
More information about the DB-SIG
mailing list