Skip to content

Commit e2cfa88

Browse files
Address pr comment
1 parent e6b9998 commit e2cfa88

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drift/instrumentation/psycopg/instrumentation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,10 @@ def _noop_execute(self, cursor: Any) -> Any:
563563
"""Handle background requests in REPLAY mode - return cursor with empty mock data."""
564564
cursor._mock_rows = [] # pyright: ignore
565565
cursor._mock_index = 0 # pyright: ignore
566+
fetchone, fetchmany, fetchall = self._create_fetch_methods(cursor, "_mock_rows", "_mock_index")
567+
cursor.fetchone = fetchone # pyright: ignore[reportAttributeAccessIssue]
568+
cursor.fetchmany = fetchmany # pyright: ignore[reportAttributeAccessIssue]
569+
cursor.fetchall = fetchall # pyright: ignore[reportAttributeAccessIssue]
566570
return cursor
567571

568572
def _replay_execute(self, cursor: Any, sdk: TuskDrift, query_str: str, params: Any, is_async: bool = False) -> Any:

0 commit comments

Comments
 (0)