def _name_to_index(cursor, table_name):
    return dict([(d[0], i) for i, d in enumerate(get_table_description(cursor, table_name))])
Returns a dictionary of {field_name: field_index} for the given table.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/db/backends/mysql_old/introspection.py/_name_to_index