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

Method advance

pymysql/protocol.py:85–92  ·  view source on GitHub ↗

Advance the cursor in data buffer 'length' bytes.

(self, length)

Source from the content-addressed store, hash-verified

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