MCPcopy
hub / github.com/PyMySQL/PyMySQL / advance

Method advance

pymysql/protocol.py:86–93  ·  view source on GitHub ↗

Advance the cursor in data buffer 'length' bytes.

(self, length)

Source from the content-addressed store, hash-verified

84 return result
85
86 def advance(self, length):
87 """Advance the cursor in data buffer 'length' bytes."""
88 new_position = self._position + length
89 if new_position < 0 or new_position > len(self._data):
90 raise Exception(
91 f"Invalid advance amount ({length}) for cursor. Position={new_position}"
92 )
93 self._position = new_position
94
95 def rewind(self, position=0):
96 """Set the position of the data buffer cursor to 'position'."""

Callers 3

raise_for_errorMethod · 0.95
__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected