Re: catching SQL string returned to sqlite
henk-jan ebbers <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
I did this this way, using my won connection-class, and using my own cursor-class: import sqlite3 as sqlite# Python 2.5 and up class BotsConnection(sqlite.Connection): def cursor(self): return Cursor(self) class Cursor(sqlite.Cursor): def execute(self,string,parameters=None): print sting, parameters sqlite.Cursor.execute(self,string, parameters) def connect(database): conn= sqlite.connect(database, factory=BotsConnection) cursor = terug.cursor() return conn Eric S. Johansson wrote: is there any way to catch the final string just before it is passed to sqlite? I have query that is failing (you've seen it before) and I verified that all the data is in the table as verified by the sqlite commandline tool and I'm handing it the right key. I think I have all my tuples lined up in a row and yet, I can't find the specified record. is there any way to somehow look within pysqlite and see what's being sent to sqlite? Related, it is it possible that I can't use a key with an '@' in it? ---eric _______________________________________________ pysqlite mailing list pysqlite-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/pysqlite