| Issue 163: | cursor.mogrify return query string | |
| 2 people starred this issue and may be notified of changes. | Back to list |
For debug or log purposes it is usefull to have the exact query for debugging.
When you use :
cursor.execute("select a from tbl where b=? and c=?", (x, y))
you can't know what is the true SQL query sent to the database because the library do some things like quoting strings and escaping quotes
Some libraries have a mogrify method on the cursor that returns the string that would be sent to the database for an execute.
It would be another (better) way to have a cursor.sql property which contain the exact query after the cursor.execute.
Mar 15, 2011
#1
lukedell...@gmail.com
Dec 26, 2011
Great comment by Luke. Exactly so. Closing. Thanks Luke.
Status:
NoFix
|