Skip to content

Commit b413d5d

Browse files
SNOW-295953: renamed RowsAffected to QueryResultStats
1 parent 70ba3d0 commit b413d5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/snowflake/connector/cursor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def rowcount(self) -> int | None:
459459
return self._total_rowcount if self._total_rowcount >= 0 else None
460460

461461
@property
462-
def stats(self) -> RowsAffected | None:
462+
def stats(self) -> QueryResultStats | None:
463463
"""Returns detailed rows affected statistics for DML operations.
464464
465465
Returns a NamedTuple with fields:
@@ -470,8 +470,8 @@ def stats(self) -> RowsAffected | None:
470470
Returns None on each position if no DML stats are available.
471471
"""
472472
if self._stats_data is None:
473-
return RowsAffected(None, None, None, None)
474-
return RowsAffected(
473+
return QueryResultStats(None, None, None, None)
474+
return QueryResultStats(
475475
num_rows_inserted=self._stats_data.get("numRowsInserted", None),
476476
num_rows_deleted=self._stats_data.get("numRowsDeleted", None),
477477
num_rows_updated=self._stats_data.get("numRowsUpdated", None),
@@ -2037,7 +2037,7 @@ def __getattr__(name):
20372037
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
20382038

20392039

2040-
class RowsAffected(NamedTuple):
2040+
class QueryResultStats(NamedTuple):
20412041
"""
20422042
Statistics for rows affected by a DML operation.
20432043
None value expresses particular statistic being unknown - not returned by the backend service.

0 commit comments

Comments
 (0)