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

Method query

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

Source from the content-addressed store, hash-verified

583
584 # The following methods are INTERNAL USE ONLY (called from Cursor)
585 def query(self, sql, unbuffered=False):
586 # if DEBUG:
587 # print("DEBUG: sending query:", sql)
588 if isinstance(sql, str):
589 sql = sql.encode(self.encoding)
590 self._execute_command(COMMAND.COM_QUERY, sql)
591 self._affected_rows = self._read_query_result(unbuffered=unbuffered)
592 return self._affected_rows
593
594 def next_result(self, unbuffered=False):
595 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