Re: [SQLObject] Attempt at Implementing Bound Params in SQLObject for get-by-id calls
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2007-08-24 22:24:56
|
Hello! On Fri, Aug 24, 2007 at 04:12:03PM -0500, Kevin J. Rice wrote: > I've been playing around with the idea that maybe SQLObject could use bound > parameters ("prepared statements") for some types of queries. I had tried to do this in the "paramstyles" private branch; look at _executeRetry(), _insertSQL() and _SO_update() at http://svn.colorstudy.com/home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py Also look at http://svn.colorstudy.com/home/phd/SQLObject/paramstyles/sqlobject/include/DBSingleStyle.py The problems that prevented me to merge all this into SQLObject is that different DB API drivers have many problems converting different types. I don't remember exactly, but I think PySQLite has problems with datetime, psycopg with mxDateTime (or vice versa). I haven't tried to retest these drivers (even less other drivers, especially MySQLdb), so I don't know now, they could do better conversions. Now I have a bigger problem because the code in the trunk has changed so much I couldn't just do "svn merge" - I have to merge things manually. PS. This brief answer is not exactly an answer for the question you have asked, and this is intentional. It is 2 past midnight here now, and I am leaving the town for a weekend. I'm answering to let you know your voice is heard. Meanwhile you can read the code, and we will continue the discussion after I return. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |