What a driver's raw result (Statement.raw) says about a statement
that changes rows, read the same way whatever the driver.
Classes#
Functions#
affected_rows#
affected_rows(result) -> intHow many rows the statement of result changed; 0 when its
driver's result does not count them.
| Parameter | Type | Description |
|---|---|---|
result | object |
Returns int
def affected_rows(result: object) -> int:
"""How many rows the statement of ``result`` changed; 0 when its
driver's result does not count them."""
return result.affected_rows if isinstance(result, RowCount) else 0