Permalink
Browse files

Fixed #5883 -- Added __iter__ methods to the debug cursor and the pos…

…tgresql backend cursor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 50ecd75 commit 732074541a17cde1d6d634007949d8a8c83cdc1a @malcolmt malcolmt committed Mar 17, 2008
Showing with 6 additions and 0 deletions.
  1. +3 −0 django/db/backends/postgresql/base.py
  2. +3 −0 django/db/backends/util.py
View
3 django/db/backends/postgresql/base.py
@@ -56,6 +56,9 @@ def __getattr__(self, attr):
else:
return getattr(self.cursor, attr)
+ def __iter__(self):
+ return iter(self.cursor)
+
class DatabaseFeatures(BaseDatabaseFeatures):
pass # This backend uses all the defaults.
View
3 django/db/backends/util.py
@@ -41,6 +41,9 @@ def __getattr__(self, attr):
else:
return getattr(self.cursor, attr)
+ def __iter__(self):
+ return iter(self.cursor)
+
###############################################
# Converters from database (string) to Python #
###############################################

0 comments on commit 7320745

Please sign in to comment.