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

Method scroll

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

_check_executedMethod · 0.95

Tested by

no test coverage detected