How do I get text descriptions for column types with MySQLdb?
I know that there is a number in cursor .description
that shows the type of column and FIELD_TYPE in it. *
such as FIELD_TYPE.ENUM = 247
Read here for a list of column types:
< P> and then make a dictionary from the provided list:
field_type = {0: 'DECIMAL', 1: 'tiny', 2: 'short', 3: 'long' 4: 'float', 5: 'double', 6: 'null', 7: 'timestamp', 8: 'longlong' 9: 'INT24', 10: 'DATE', 11: 'TIME', 12: ' DATETIME ', 13:' Year ', 14:' Renewal ', 15:' VARCHAR ', 16:' BIT ', 246:' Nudecimal ', 247:' Interval ', 248:' SET ', 24 9:' TINIBOLB ', 250:' MDIUMOBOB ', 251:' Long BLOBB ', 252:' BLOB ', 253:' VAR_STRING ', 254:' STR Ng ', 255' Gimetry '}
Comments
Post a Comment