Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-08 Thread Kapil Thangavelu
the zope transaction integration i did, basically implements a transaction manager for sqlalchemy. http://svn.objectrealms.net/svn/public/alchemist/trunk/engine.py http://svn.objectrealms.net/svn/public/alchemist/trunk/manager.py as an example of usage import transaction from engine import

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-08 Thread Michael Bayer
what a drag. this has some inconvenient effects on ResultProxy. while __del__ will still be there and im pretty confident works just fine in cPython, if you dont want to rely upon __del__ you will basically have to do: r = table.select().execute() for row in r: r.close()

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-08 Thread Michael Bayer
Kapil Thangavelu wrote: incidentally i was interested in contributing this integration as an SA extension, and wondering what that process is? thats just how id want it to be done...basically i added a mods section to the code where provided mods are stored. you can also have a mod be just

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-07 Thread Michael Bayer
its in the __del__ method of ConnectionFairy in pool.py, which can be propigated out to whatever other connection-holding object there is (such as this one i am still coming up with). so del connection is how to force the reference count down to zero. but if jython isnt going to work

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-07 Thread Brad Clements
On 7 Apr 2006 at 19:00, Michael Bayer wrote: the moral of the story is, if del object takes the reference count down to zero, but Jython is still not going to call __del__ despite this, then the connection pooling in SA needs some major changes to explicitly count checkouts within the same

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-06 Thread Qvx
On 4/5/06, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 5, 2006, at 8:12 AM, Qvx wrote: e = create_engine('foo') trans = e.begin() try:mytable.update().execute()# then in some other function..trans2 = e.begin()try:myothertable.update.execute()trans2.commit() # doesnt

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-06 Thread Michael Bayer
On Apr 6, 2006, at 3:01 AM, Qvx wrote: I can work around all those issues (allready have) by explicitely managing my transactions, but it would be nice if we could make it work. Something like this: # called from decorator def run_with_transaction(func, *arg, **kw): try: #

Re: [Sqlalchemy-users] Transactions and Sessions, proposal #2

2006-04-06 Thread Daniel Miller
Michael Bayer wrote: The SQLEngine architecture, as well as the objectstore and everything else, heavily relies upon thread-local storage to share resources. So far, there has not really been much concept of a connection outside of the pooling module since it was all built in such a way