Ticket #2662: util.py.diff
File util.py.diff, 751 bytes (added by , 18 years ago) |
---|
-
django/db/backends/util.py
110 110 def dictfetchmany(cursor, number): 111 111 "Returns a certain number of rows from a cursor as a dict" 112 112 desc = cursor.description 113 return [_dict_helper(desc, row) for row in cursor.fetchmany(number)] 113 for row in cursor.fetchmany(number): 114 yield _dict_helper(desc, row) 114 115 115 116 def dictfetchall(cursor): 116 117 "Returns all rows from a cursor as a dict" 117 118 desc = cursor.description 118 return [_dict_helper(desc, row) for row in cursor.fetchall()] 119 for row in cursor.fetchall(): 120 yield _dict_helper(desc, row)