Re: [SQLObject] Re: Preparing for 0.6.1
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2004-12-31 18:33:58
|
On Fri, Dec 31, 2004 at 11:57:55AM -0600, Luke Opperman wrote: > >>> conn = connectionForURI("...") > >>> if connection.supportTransactions: > >>> conn = conn.transaction() > >>> > >>> class Person(SQLObject): > >>> _connection = conn > >> > > Neither. You can call conn.begin(), conn.commit() and conn.rollback() > >at your will. After calling conn.rollback() you have to call > >conn.begin(). That's simple. > > Am I correct in thinking this is unusable in a multi-threaded > environment I don't know. I have never used threads and I hope I'll never use it. The above code works great in a forking server (Quixote+SCGI). Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |