-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilize the allow_sql context var to record SQL queries.
This also switches our CursorWrappers to inherit from the django class django.db.backends.utils.CursorWrapper. This reduces some of the code we need. This also explicitly disallows specific cursor methods from being used. This is because the psycopg3 backend's mogrify function creates a new cursor in order to determine the last used connection. This means that the ExceptionCursorWrapper technically needs to access both connection and cursor. Rather than defining an odd allow list, an explicit deny list made more sense. One area of concern is that this wouldn't cover the __iter__ function.
- Loading branch information
1 parent
d935165
commit d71474a
Showing
1 changed file
with
114 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters