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 12:59:25
|
On Fri, Dec 31, 2004 at 01:02:25AM -0500, Brian Beck wrote: > - Do only methods that are passed the transaction provided by > conn.transaction() take advantage of it? If so, how do you insert new > rows within a transaction? I can only see one way to create a new row, > i.e.: Person(name='Brian'), but no way to pass this a transaction > 'instance' (I tried a few different ways). The simplest method is to create a connection, wrap it into a transactiona and after that decalre your tables: conn = connectionForURI("...") if connection.supportTransactions: conn = conn.transaction() class Person(SQLObject): _connection = conn Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |