MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / fetchmany

Method fetchmany

pager_lib/pymysql/cursors.py:282–292  ·  view source on GitHub ↗

Fetch several rows.

(self, size=None)

Source from the content-addressed store, hash-verified

280 return result
281
282 def fetchmany(self, size=None):
283 """Fetch several rows."""
284 self._check_executed()
285 if self._rows is None:
286 # Django expects () for EOF.
287 # https://github.com/django/django/blob/0c1518ee429b01c145cf5b34eab01b0b92f8c246/django/db/backends/mysql/features.py#L8
288 return ()
289 end = self.rownumber + (size or self.arraysize)
290 result = self._rows[self.rownumber : end]
291 self.rownumber = min(end, len(self._rows))
292 return result
293
294 def fetchall(self):
295 """Fetch all the rows."""

Callers

nothing calls this directly

Calls 1

_check_executedMethod · 0.95

Tested by

no test coverage detected