Django

Code

Changeset 2347

Show
Ignore:
Timestamp:
02/18/06 15:28:19 (3 years ago)
Author:
adrian
Message:

Added better docstring to get_indexes() for MySQL backend

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/db/backends/mysql.py

    r2346 r2347  
    137137 
    138138def get_indexes(cursor, table_name): 
    139     "Returns a dict of indexes for given table" 
     139    """ 
     140    Returns a dictionary of fieldname -> infodict for the given table, 
     141    where each infodict is in the format: 
     142        {'keyname': 'name of key', 
     143         'unique': boolean representing whether it's a unique index} 
     144    """ 
    140145    cursor.execute("SHOW INDEX FROM %s" % DatabaseWrapper().quote_name(table_name)) 
    141146    indexes = {}