mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
When looking for django tables which exist, query for all tables once, not once *per table*.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -4,7 +4,7 @@ from django.db.backends import BaseDatabaseIntrospection
|
||||
# This light wrapper "fakes" a dictionary interface, because some SQLite data
|
||||
# types include variables in them -- e.g. "varchar(30)" -- and can't be matched
|
||||
# as a simple dictionary lookup.
|
||||
class FlexibleFieldLookupDict:
|
||||
class FlexibleFieldLookupDict(object):
|
||||
# Maps SQL types to Django Field types. Some of the SQL types have multiple
|
||||
# entries here because SQLite allows for anything and doesn't normalize the
|
||||
# field type; it uses whatever was given.
|
||||
@@ -138,4 +138,3 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||
'null_ok': not field[3],
|
||||
'pk': field[5] # undocumented
|
||||
} for field in cursor.fetchall()]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user