MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / escape_string

Method escape_string

pymysql/connections.py:551–554  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

549 return self.escape(obj, self.encoders)
550
551 def escape_string(self, s):
552 if self.server_status & SERVER_STATUS.SERVER_STATUS_NO_BACKSLASH_ESCAPES:
553 return s.replace("'", "''")
554 return converters.escape_string(s)
555
556 def _quote_bytes(self, s):
557 if self.server_status & SERVER_STATUS.SERVER_STATUS_NO_BACKSLASH_ESCAPES:

Callers 2

escapeMethod · 0.95
test_escape_stringMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_escape_stringMethod · 0.64