Fix fetchmany().

This commit is contained in:
adustman
2001-12-29 02:28:18 +00:00
parent 2467c49b83
commit 18ef0ec67d

View File

@@ -231,7 +231,7 @@ class CursorStoreResultMixIn:
"""Fetch up to size rows from the cursor. Result set may be smaller
than size. If size is not defined, cursor.arraysize is used."""
self._check_executed()
end = self.rownumber + size or self.arraysize
end = self.rownumber + (size or self.arraysize)
result = self._rows[self.rownumber:end]
self.rownumber = min(end, len(self._rows))
return result