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

Method query

pymysql/connections.py:576–583  ·  view source on GitHub ↗
(self, sql, unbuffered=False)

Source from the content-addressed store, hash-verified

574
575 # The following methods are INTERNAL USE ONLY (called from Cursor)
576 def query(self, sql, unbuffered=False):
577 # if DEBUG:
578 # print("DEBUG: sending query:", sql)
579 if isinstance(sql, str):
580 sql = sql.encode(self.encoding, "surrogateescape")
581 self._execute_command(COMMAND.COM_QUERY, sql)
582 self._affected_rows = self._read_query_result(unbuffered=unbuffered)
583 return self._affected_rows
584
585 def next_result(self, unbuffered=False):
586 self._affected_rows = self._read_query_result(unbuffered=unbuffered)

Callers 5

killMethod · 0.95
_queryMethod · 0.80
_queryMethod · 0.80

Calls 2

_execute_commandMethod · 0.95
_read_query_resultMethod · 0.95

Tested by 2