MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / scroll

Method scroll

pymysql/cursors.py:319–330  ·  view source on GitHub ↗
(self, value, mode="relative")

Source from the content-addressed store, hash-verified

317 return result
318
319 def scroll(self, value, mode="relative"):
320 self._check_executed()
321 if mode == "relative":
322 r = self.rownumber + value
323 elif mode == "absolute":
324 r = value
325 else:
326 raise err.ProgrammingError("unknown scroll mode %s" % mode)
327
328 if not (0 <= r < len(self._rows)):
329 raise IndexError("out of range")
330 self.rownumber = r
331
332 def _query(self, q):
333 conn = self._get_db()

Callers

nothing calls this directly

Calls 1

_check_executedMethod · 0.95

Tested by

no test coverage detected