From: Janzert <janz...@gmail.com>
Date: Mon, 16 Apr 2007 16:47:16 -0400
Local: Mon, Apr 16 2007 4:47 pm
Subject: Re: Help with implicit transactions
Alberto Valverde wrote: It would be nice if instead of holding onto a local reference to the > On Apr 16, 2007, at 6:53 PM, George Sakkis wrote: >> On Apr 16, 12:18 pm, Alberto Valverde <albe...@toscat.net> wrote: >>>> Is there any way I can force a COMMIT within an exposed method ? >> from turbogears import database as db >> How can I access the implicit transaction created by TG or its > You'll need access to the transaction instance. Unfortunately it's a > connection = engine.connect() > then connection.execute(table.select()) # or whatever > as described in the mentioned link. Can you try this patch see if it > Index: turbogears/database.py > Alberto transaction it used the one in the request object to commit and rollback (i.e. get rid of the transaction variable above and change all references to req.sa_transaction). I believe this would solve the problem where people want to be able to rollback the transaction and then start a new one within a controller. Janzert You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||