Sanjeev Paskaradevan added the comment:

An implementation of mogrify for pysqlite will necessarily be different from 
the Psycopg2 implementation because of the way queries are executed in Psycopg2 
vs. pysqlite.

In Pyscopg2 the arguments are bound into the query using mogrify and then 
executed using PQExec or PQsendQuery.

Whereas the pysqlite implementation uses sqlite3 prepared statements to bind 
the parameters using the interfaces defined here: 
http://www.sqlite.org/c3ref/bind_blob.html

As such, the pysqlite implementation never holds a "complete" sql statement 
with substituted parameters, as well, the sqlite3 C interfaces do not provide a 
way to retrive the complete statement.

We can implement a 'mogrify' method for pysqlite but by necessity it would not 
be "exactly" the same as the psycopg2 implementation.  For one thing the string 
thus generated would not be the statement that is sent to sqlite3.

Should we implement a mogrify anyway?

----------
nosy: +Sanjeev

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9506>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to