'Return a description of the table with the DB-API cursor.description
interface."'

def get_table_description(self, cursor, table_name):

    cursor.execute("\n                                                SELECT\n                                                                column_name,    data_type,    character_maximum_length,\n                                                                numeric_precision,    numeric_scale,    extra,    column_default,\n                                                                CASE\n                                                                                WHEN    column_type    LIKE    '%%    unsigned'    THEN    1\n                                                                                ELSE    0\n                                                                END    AS    is_unsigned\n                                                FROM    information_schema.columns\n                                                WHERE    table_name    =    %s    AND    table_schema    =    DATABASE()", [table_name])
    field_info = {line[0]: InfoLine(*line) for line in cursor.fetchall()}
    cursor.execute(('SELECT    *    FROM    %s    LIMIT    1' % self.connection.ops.quote_name(table_name)))
    def to_int(i):
        return (int(i) if (i is not None) else i)
    fields = []
    for line in cursor.description:
        col_name = line[0]
        fields.append(FieldInfo(*(((col_name,) + line[1:3]) + ((to_int(field_info[col_name].max_len) or line[3]), (to_int(field_info[col_name].num_prec) or line[4]), (to_int(field_info[col_name].num_scale) or line[5]), line[6], field_info[col_name].column_default, field_info[col_name].extra, field_info[col_name].is_unsigned))))
    return fields
