Re: [SQLObject] More transaction troubles
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-09-07 18:32:46
|
On Sunday, September 7, 2003, at 05:00 AM, Randall Randall wrote: > Okay I did that, and all the SQL looks sane. It appears (from > reading source) that Transaction() just passes through any > commit() or rollback() it gets to psycopg (in this case), so > there isn't any SQL generated from a rollback(). > > I noticed that there's an "autoCommit" keyword for > PostgresConnection(), and the comments imply that it should > be turned on for transactions to work, but using it send > a "pool" keyword to DBAPI.__init__(), and thence to > DBConnection.__init__(), which doesn't expect it. > > Using the query method of Transaction(), I can see that > commit() and rollback() are working okay; I think the > reason that transactions didn't appear to work, above, > is that SQLObject.new() just ignores the 'connection' > keyword (and perhaps that's what it's supposed to do?). > > Setting _connection to the transaction in the class > definition does seem to work, with the exception that > a lot of stuff isn't defined for Transaction() that > is supposed to be there for a _connection, like > '_SO_selectOne', 'queryInsertID', etc. > Try CVS, I fixed a bunch of these yesterday. Or http://colorstudy.com/ianb/SQLObject-cvs.tar.bz2 Ian |