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

def get_table_description(self, cursor, table_name):

    cursor.execute('\n                                                SELECT    column_name,    character_maximum_length    FROM    information_schema.columns\n                                                WHERE    table_name    =    %s    AND    table_schema    =    DATABASE()\n                                                                AND    character_maximum_length    IS    NOT    NULL', [table_name])
    length_map = dict(cursor.fetchall())
    cursor.execute("\n                                                SELECT    column_name,    numeric_precision,    numeric_scale    FROM    information_schema.columns\n                                                WHERE    table_name    =    %s    AND    table_schema    =    DATABASE()\n                                                                AND    data_type='decimal'", [table_name])
    numeric_map = dict([(line[0], tuple([int(n) for n in line[1:]])) for line in cursor.fetchall()])
    cursor.execute(('SELECT    *    FROM    %s    LIMIT    1' % self.connection.ops.quote_name(table_name)))
    return [FieldInfo(*(((((force_text(line[0]),) + line[1:3]) + (length_map.get(line[0], line[3]),)) + numeric_map.get(line[0], line[4:6])) + (line[6],))) for line in cursor.description]
