Skip to content

Commit b30ccba

Browse files
committed
refactor: remove unused _escape_bytes method from base cursor
1 parent b5012ef commit b30ccba

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

mariadb/base_cursor.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -249,29 +249,7 @@ def __next__(self) -> Any:
249249
...
250250

251251
# Common helper methods (non-async, pure data transformation)
252-
253-
def _escape_bytes(self, value: bytes, no_backslash_escapes: bool) -> str:
254-
"""
255-
Escape bytes value for binary data.
256-
257-
Args:
258-
value: Bytes value to escape
259-
no_backslash_escapes: Whether NO_BACKSLASH_ESCAPES is set
260-
261-
Returns:
262-
str: Escaped bytes as binary literal
263-
"""
264-
# Convert bytes to hex representation
265-
hex_value = value.hex()
266-
267-
if no_backslash_escapes:
268-
# Use X'...' format for hex literals when NO_BACKSLASH_ESCAPES is set
269-
return f"X'{hex_value.upper()}'"
270-
else:
271-
# Use _binary'...' format with proper escaping
272-
escaped_hex = hex_value.replace('\\', '\\\\').replace("'", "\\'")
273-
return f"_binary'{escaped_hex}'"
274-
252+
275253
def _process_completions(self, completions: List[Any]) -> None:
276254
"""
277255
Process completions from client execution

0 commit comments

Comments
 (0)