Fetch several rows.
(self, size=None)
| 293 | return result |
| 294 | |
| 295 | def fetchmany(self, size=None): |
| 296 | """Fetch several rows.""" |
| 297 | self._check_executed() |
| 298 | if self._rows is None: |
| 299 | # Django expects () for EOF. |
| 300 | # https://github.com/django/django/blob/0c1518ee429b01c145cf5b34eab01b0b92f8c246/django/db/backends/mysql/features.py#L8 |
| 301 | return () |
| 302 | end = self.rownumber + (size or self.arraysize) |
| 303 | result = self._rows[self.rownumber : end] |
| 304 | self.rownumber = min(end, len(self._rows)) |
| 305 | return result |
| 306 | |
| 307 | def fetchall(self): |
| 308 | """Fetch all the rows.""" |