sql.mysql.results
import sql.mysql.results
sqldoes not re-export this module, so it is reached only by importing it directly.
Turning what the server answered into the shapes the shared contract asks for.
These live apart from the connection so the statement can use them too. A statement that reached for them through the connection, which already reaches for the statement, would be a circular import.
Functions
exec_result()
sql.mysql.results.exec_result(response: dict) -> dict
What a statement run for its effect reports.
A statement that returned rows still has to answer this, since
execute() may be called on anything. Its row count is zero, which is
true: it changed nothing.
Parameters
response(dict) — FromProtocol.read_response().
Returns dict — { rows_affected, last_insert_id }
select_result()
sql.mysql.results.select_result(response: dict) -> dict
What a statement run for its rows reports.
A statement that returned none still answers with the same shape and an empty result, so a caller never has to tell the two apart.
Parameters
response(dict) — FromProtocol.read_response().
Returns dict — { columns, rows }
2026, Richard Ore and Zuri contributors