Removed backend.dictfetchone(), as it wasn't being used anywhere
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
221f99ed58
commit
1b4cfd4fea
|
@ -5,6 +5,10 @@ except ImportError:
|
|||
# Import copy of _thread_local.py from Python 2.4
|
||||
from django.utils._threading_local import local
|
||||
|
||||
def _dict_helper(desc, row):
|
||||
"Returns a dictionary for the given cursor.description and result row."
|
||||
return dict(zip([col[0] for col in desc], row))
|
||||
|
||||
class BaseDatabaseWrapper(local):
|
||||
"""
|
||||
Represents a database connection.
|
||||
|
|
|
@ -102,7 +102,6 @@ supports_constraints = True
|
|||
supports_tablespaces = True
|
||||
uses_case_insensitive_names = False
|
||||
|
||||
dictfetchone = util.dictfetchone
|
||||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ class DatabaseWrapper(object):
|
|||
|
||||
supports_constraints = False
|
||||
supports_tablespaces = False
|
||||
dictfetchone = complain
|
||||
dictfetchmany = complain
|
||||
dictfetchall = complain
|
||||
|
||||
|
|
|
@ -184,7 +184,6 @@ supports_constraints = True
|
|||
supports_tablespaces = False
|
||||
uses_case_insensitive_names = False
|
||||
|
||||
dictfetchone = util.dictfetchone
|
||||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
|
|
|
@ -203,7 +203,6 @@ supports_constraints = True
|
|||
supports_tablespaces = False
|
||||
uses_case_insensitive_names = False
|
||||
|
||||
dictfetchone = util.dictfetchone
|
||||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
|
|
|
@ -224,7 +224,6 @@ def to_unicode(s):
|
|||
return force_unicode(s)
|
||||
return s
|
||||
|
||||
dictfetchone = util.dictfetchone
|
||||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
|
|
|
@ -200,10 +200,6 @@ supports_constraints = True
|
|||
supports_tablespaces = False
|
||||
uses_case_insensitive_names = False
|
||||
|
||||
def dictfetchone(cursor):
|
||||
"Returns a row from the cursor as a dict"
|
||||
return cursor.dictfetchone()
|
||||
|
||||
def dictfetchmany(cursor, number):
|
||||
"Returns a certain number of rows from a cursor as a dict"
|
||||
return cursor.dictfetchmany(number)
|
||||
|
|
|
@ -163,7 +163,6 @@ supports_constraints = True
|
|||
supports_tablespaces = False
|
||||
uses_case_insensitive_names = False
|
||||
|
||||
dictfetchone = util.dictfetchone
|
||||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
|
|
|
@ -120,7 +120,6 @@ supports_constraints = False
|
|||
supports_tablespaces = False
|
||||
uses_case_insensitive_names = False
|
||||
|
||||
dictfetchone = util.dictfetchone
|
||||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
|
|
|
@ -133,13 +133,6 @@ def _dict_helper(desc, row):
|
|||
"Returns a dictionary for the given cursor.description and result row."
|
||||
return dict(zip([col[0] for col in desc], row))
|
||||
|
||||
def dictfetchone(cursor):
|
||||
"Returns a row from the cursor as a dict"
|
||||
row = cursor.fetchone()
|
||||
if not row:
|
||||
return None
|
||||
return _dict_helper(cursor.description, row)
|
||||
|
||||
def dictfetchmany(cursor, number):
|
||||
"Returns a certain number of rows from a cursor as a dict"
|
||||
desc = cursor.description
|
||||
|
|
Loading…
Reference in New Issue