Skip to content
Browse files

Added better docstring to get_indexes() for MySQL backend

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent ac97cf5 commit 27b41fd9ded886cd44dbc0b27c6b622a743cbc28 @adrianholovaty adrianholovaty committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 django/core/db/backends/
7 django/core/db/backends/
@@ -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():

0 comments on commit 27b41fd

Please sign in to comment.
Something went wrong with that request. Please try again.