This commit is contained in:
Brenton Partridge 2025-03-24 09:07:37 -07:00 committed by GitHub
commit c438e358aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,7 @@ class NormalCursorWrapper:
alias = getattr(self.db, "alias", "default")
conn = self.db.connection
vendor = getattr(conn, "vendor", "unknown")
sql_str = sql.decode(errors="ignore") if isinstance(sql, bytes) else sql
params = {
"vendor": vendor,
@ -122,7 +123,7 @@ class NormalCursorWrapper:
"start_time": start_time,
"stop_time": stop_time,
"is_slow": duration > 10,
"is_select": sql.lower().strip().startswith("select"),
"is_select": sql_str.lower().strip().startswith("select"),
}
if vendor == "postgresql":