From a6a5e3cf326849da55483cc041d8b69589183976 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 20 Aug 2007 01:14:53 +0000 Subject: [PATCH] Removed backend.dictfetchall(), as it wasn't being used anywhere git-svn-id: http://code.djangoproject.com/svn/django/trunk@5970 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/ado_mssql/base.py | 2 -- django/db/backends/dummy/base.py | 1 - django/db/backends/mysql/base.py | 2 -- django/db/backends/mysql_old/base.py | 2 -- django/db/backends/oracle/base.py | 2 -- django/db/backends/postgresql/base.py | 4 ---- django/db/backends/postgresql_psycopg2/base.py | 2 -- django/db/backends/sqlite3/base.py | 2 -- django/db/backends/util.py | 6 ------ 9 files changed, 23 deletions(-) diff --git a/django/db/backends/ado_mssql/base.py b/django/db/backends/ado_mssql/base.py index 10bc30a24c8..fe7daaf765c 100644 --- a/django/db/backends/ado_mssql/base.py +++ b/django/db/backends/ado_mssql/base.py @@ -102,8 +102,6 @@ supports_constraints = True supports_tablespaces = True uses_case_insensitive_names = False -dictfetchall = util.dictfetchall - OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/dummy/base.py b/django/db/backends/dummy/base.py index faee7ab3299..94fa3e1c232 100644 --- a/django/db/backends/dummy/base.py +++ b/django/db/backends/dummy/base.py @@ -39,6 +39,5 @@ class DatabaseWrapper(object): supports_constraints = False supports_tablespaces = False -dictfetchall = complain OPERATOR_MAPPING = {} diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 60af0c65bb4..1501508b4c0 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -184,8 +184,6 @@ supports_constraints = True supports_tablespaces = False uses_case_insensitive_names = False -dictfetchall = util.dictfetchall - OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/mysql_old/base.py b/django/db/backends/mysql_old/base.py index ba88042f5a2..296a576e269 100644 --- a/django/db/backends/mysql_old/base.py +++ b/django/db/backends/mysql_old/base.py @@ -203,8 +203,6 @@ supports_constraints = True supports_tablespaces = False uses_case_insensitive_names = False -dictfetchall = util.dictfetchall - OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index a96056b1871..842efde35c8 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -224,8 +224,6 @@ def to_unicode(s): return force_unicode(s) return s -dictfetchall = util.dictfetchall - def get_field_cast_sql(db_type): if db_type.endswith('LOB'): return "DBMS_LOB.SUBSTR(%s%s)" diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 9420909d5a8..a7239d183f0 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -200,10 +200,6 @@ supports_constraints = True supports_tablespaces = False uses_case_insensitive_names = False -def dictfetchall(cursor): - "Returns all rows from a cursor as a dict" - return cursor.dictfetchall() - def typecast_string(s): """ Cast all returned strings to unicode strings. diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index fe50c998bb4..f844f3ea155 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -163,8 +163,6 @@ supports_constraints = True supports_tablespaces = False uses_case_insensitive_names = False -dictfetchall = util.dictfetchall - OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'ILIKE %s', diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index f34e23598dd..96f88dfa172 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -120,8 +120,6 @@ supports_constraints = False supports_tablespaces = False uses_case_insensitive_names = False -dictfetchall = util.dictfetchall - def _sqlite_extract(lookup_type, dt): try: dt = util.typecast_timestamp(dt) diff --git a/django/db/backends/util.py b/django/db/backends/util.py index fc3fbfcc3d7..bd66a1ddbe0 100644 --- a/django/db/backends/util.py +++ b/django/db/backends/util.py @@ -132,9 +132,3 @@ def truncate_name(name, length=None): 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 dictfetchall(cursor): - "Returns all rows from a cursor as a dict" - desc = cursor.description - for row in cursor.fetchall(): - yield _dict_helper(desc, row)