MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / fetchmany

Method fetchmany

pymysql/cursors.py:290–300  ·  view source on GitHub ↗

Fetch several rows.

(self, size=None)

Source from the content-addressed store, hash-verified

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

Callers 6

test_SSCursorMethod · 0.45
test_warningsMethod · 0.45
test_DictCursorMethod · 0.45
test_custom_dictMethod · 0.45
test_fetchmanyMethod · 0.45
test_mixedfetchMethod · 0.45

Calls 1

_check_executedMethod · 0.95

Tested by 6

test_SSCursorMethod · 0.36
test_warningsMethod · 0.36
test_DictCursorMethod · 0.36
test_custom_dictMethod · 0.36
test_fetchmanyMethod · 0.36
test_mixedfetchMethod · 0.36