Skip to content

Commit 2d19d75

Browse files
author
James Robinson
committed
Merge branch 'more_logging_when_cannot_use_transaction' of https://github.com/noteable-io/asyncpg-crdb-noteable into more_logging_when_cannot_use_transaction
2 parents 42de38d + e9bdf40 commit 2d19d75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

asyncpg/connection.py

+4
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ async def execute(self, query: str, *args, timeout: float = None) -> str:
335335
"""
336336
self._check_open()
337337

338+
# Append to circular buffer of most recent executed statements
339+
# for debugging.
340+
self._recent_statements.append(query)
341+
338342
if not args:
339343
self._recent_statements.append(query)
340344
return await self._protocol.query(query, timeout)

0 commit comments

Comments
 (0)