Added better docstring to get_indexes() for MySQL backend
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ac97cf54af
commit
27b41fd9de
|
@ -136,7 +136,12 @@ def get_relations(cursor, table_name):
|
|||
raise NotImplementedError
|
||||
|
||||
def get_indexes(cursor, table_name):
|
||||
"Returns a dict of indexes for given table"
|
||||
"""
|
||||
Returns a dictionary of fieldname -> infodict for the given table,
|
||||
where each infodict is in the format:
|
||||
{'keyname': 'name of key',
|
||||
'unique': boolean representing whether it's a unique index}
|
||||
"""
|
||||
cursor.execute("SHOW INDEX FROM %s" % DatabaseWrapper().quote_name(table_name))
|
||||
indexes = {}
|
||||
for row in cursor.fetchall():
|
||||
|
|
Loading…
Reference in New Issue