This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sanjeev
Recipients Sanjeev, goatbar, r.david.murray
Date 2013-03-21.00:01:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363824064.85.0.203216645685.issue9506@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2013-03-21 00:01:04Sanjeevsetrecipients: + Sanjeev, r.david.murray, goatbar
2013-03-21 00:01:04Sanjeevsetmessageid: <1363824064.85.0.203216645685.issue9506@psf.upfronthosting.co.za>
2013-03-21 00:01:04Sanjeevlinkissue9506 messages
2013-03-21 00:01:04Sanjeevcreate