MCPcopy Create free account
hub / github.com/PyMySQL/mysqlclient / fetchmany

Method fetchmany

src/MySQLdb/cursors.py:379–386  ·  view source on GitHub ↗

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, size=None)

Source from the content-addressed store, hash-verified

377 return result
378
379 def fetchmany(self, size=None):
380 """Fetch up to size rows from the cursor. Result set may be smaller
381 than size. If size is not defined, cursor.arraysize is used."""
382 self._check_executed()
383 end = self.rownumber + (size or self.arraysize)
384 result = self._rows[self.rownumber : end]
385 self.rownumber = min(end, len(self._rows))
386 return result
387
388 def fetchall(self):
389 """Fetches all available rows from the cursor."""

Callers

nothing calls this directly

Calls 1

_check_executedMethod · 0.80

Tested by

no test coverage detected