Django

Code

Changeset 5968

Show
Ignore:
Timestamp:
08/19/07 20:13:12 (1 year ago)
Author:
adrian
Message:

Removed backend.dictfetchone(), as it wasn't being used anywhere

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/backends/ado_mssql/base.py

    r5967 r5968  
    103103uses_case_insensitive_names = False 
    104104 
    105 dictfetchone = util.dictfetchone 
    106105dictfetchmany = util.dictfetchmany 
    107106dictfetchall  = util.dictfetchall 
  • django/trunk/django/db/backends/dummy/base.py

    r5967 r5968  
    4040supports_constraints = False 
    4141supports_tablespaces = False 
    42 dictfetchone = complain 
    4342dictfetchmany = complain 
    4443dictfetchall = complain 
  • django/trunk/django/db/backends/__init__.py

    r5967 r5968  
    55    # Import copy of _thread_local.py from Python 2.4 
    66    from django.utils._threading_local import local 
     7 
     8def _dict_helper(desc, row): 
     9    "Returns a dictionary for the given cursor.description and result row." 
     10    return dict(zip([col[0] for col in desc], row)) 
    711 
    812class BaseDatabaseWrapper(local): 
  • django/trunk/django/db/backends/mysql/base.py

    r5967 r5968  
    185185uses_case_insensitive_names = False 
    186186 
    187 dictfetchone = util.dictfetchone 
    188187dictfetchmany = util.dictfetchmany 
    189188dictfetchall  = util.dictfetchall 
  • django/trunk/django/db/backends/mysql_old/base.py

    r5967 r5968  
    204204uses_case_insensitive_names = False 
    205205 
    206 dictfetchone = util.dictfetchone 
    207206dictfetchmany = util.dictfetchmany 
    208207dictfetchall  = util.dictfetchall 
  • django/trunk/django/db/backends/oracle/base.py

    r5967 r5968  
    225225    return s 
    226226 
    227 dictfetchone = util.dictfetchone 
    228227dictfetchmany = util.dictfetchmany 
    229228dictfetchall  = util.dictfetchall 
  • django/trunk/django/db/backends/postgresql/base.py

    r5967 r5968  
    201201uses_case_insensitive_names = False 
    202202 
    203 def dictfetchone(cursor): 
    204     "Returns a row from the cursor as a dict" 
    205     return cursor.dictfetchone() 
    206  
    207203def dictfetchmany(cursor, number): 
    208204    "Returns a certain number of rows from a cursor as a dict" 
  • django/trunk/django/db/backends/postgresql_psycopg2/base.py

    r5967 r5968  
    164164uses_case_insensitive_names = False 
    165165 
    166 dictfetchone = util.dictfetchone 
    167166dictfetchmany = util.dictfetchmany 
    168167dictfetchall = util.dictfetchall 
  • django/trunk/django/db/backends/sqlite3/base.py

    r5967 r5968  
    121121uses_case_insensitive_names = False 
    122122 
    123 dictfetchone = util.dictfetchone 
    124123dictfetchmany = util.dictfetchmany 
    125124dictfetchall  = util.dictfetchall 
  • django/trunk/django/db/backends/util.py

    r5609 r5968  
    134134    return dict(zip([col[0] for col in desc], row)) 
    135135 
    136 def dictfetchone(cursor): 
    137     "Returns a row from the cursor as a dict" 
    138     row = cursor.fetchone() 
    139     if not row: 
    140         return None 
    141     return _dict_helper(cursor.description, row) 
    142  
    143136def dictfetchmany(cursor, number): 
    144137    "Returns a certain number of rows from a cursor as a dict"