[Twisted-Python] PATCH: runQuery
Federico Di Gregorio
fog at initd.org
Fri Mar 7 03:35:04 EST 2003
Il ven, 2003-03-07 alle 03:27, Clark C. Evans ha scritto:
> On Thu, Mar 06, 2003 at 08:02:07PM -0600, Glyph Lefkowitz wrote:
> | On Thursday, March 6, 2003, at 07:49 PM, Dave Peticolas wrote:
> | >I think you are imposing policy for no reason.
> |
> | I think that this is a tough call, although I am very slightly inclined
> | to agree with davep.
> |
> | Why don't we make committing an optional argument, by default on, which
> | you can easily turn off if you want a rollback instead? (At the risk
> | of making an overbroad generalization: rollback() tends to be more
> | expensive than commit() most of the time, which is another good reason
> | to make it the default.)
>
> Typically one would call rollback() before you put
> the connection back into the connection pool. Overall,
> I think there is a lower level design problem with
> the adbapi module. If you are only running one query
> then there isn't a rpoblem, but if you are executing
> 3 queries, say sequentially, then you don't want
> that rollback. The adbapi needs to expose 'connection'
> object as a whole, with cursors. I'll need to fix
> this for myself... so if no one else does, I'll patch.
it does. look at runInteraction and the Transaction object.
--
Federico Di Gregorio
Debian GNU/Linux Developer fog at debian.org
INIT.D Developer fog at initd.org
I came like Water, and like Wind I go. -- Omar Khayam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030307/127b0a4c/attachment.pgp
More information about the Twisted-Python
mailing list