kinterbas db column type

Uwe Grauer news at grauer-online.de
Wed Nov 26 13:50:40 EST 2003


Gandalf wrote:

> 
>>>> i need to know the database column types returned by kinterbasdb.
>>>> Implicit type conversion is i nice thing to have, but it hides the 
>>>> real types in the database.
>>>> So how could i get this information? 
>>>
>>>
>>>
>>> RDB$RELATIONS - this stores table information
>>> RDB$FIELDS - this is for the fields (here you have the RDB$FIELD_TYPE 
>>> field)
>>> RDB$RELATION_FIELDS - connects relations to fields
>>>
>> Does this mean, that the kinterbasdb isn't DB-API 2.0 compliant?
>>
> It is DB-API 2.0 compilant. I'm sorry, maybe I misunderstood you. This 
> is a way
> to get the column types in InterBase inside. Do you want to know the 
> Python types
> in the row returned by .fetch()?
> 
> 
Sorry Gandalf,

more explanation:

It's different from other modules cause it does a implicit type
conversion to the Python-types.
So for a DATETIME-column in mysql you get a type_code 12 (which is
indeed DATETIME in MySQLdb) but in kinterbasdb you get  t_tuple. This
does not help me very much since the information i need is different
from what i get.

Uwe







More information about the Python-list mailing list