My guess is that a transaction should handle that. -r.
On Tue, Aug 19, 2008 at 4:47 PM, Chris Curvey <[EMAIL PROTECTED]> wrote:
>
> I'm using Pylons with SQLAlchemy & Elixir. I need to run three SQL
> commands in sequence, but I have to be certain that all three are done
> on the same connection. So something like this in my controller class
>
> from sqlalchemy import text
> model.metadata.bind.execute(text("set enable_seqscan=off"))
> model.metadata.bind.execute(text("select * from foo where bar
> = :bar"), bar=1)
> model.metadata.bind.execute(text("set enable_seqscan=on"))
>
> Is there a way for me to be sure that all three of these commands
> would occur on the same connection?
> >
>
--
http://twitter.com/rpf
http://rickflosi.blogspot.com/
"The issue is always the same: the government or the market. There is no
third solution." - Ludwig von Mises, Planned Chaos
"Capitalism tends toward a productive orientation when the capitalist
entrepreneurs can neither use coercion for the purpose of parasitic
exploitation, nor are so devoid of strength as to be exposed to exploitation
themselves -- in other words, when businessmen are too weak to prey upon the
other classes, but too strong to be preyed upon. Such a situation -- which
in my previous books I proposed to call equidependency -- requires a certain
degree of balance of power between the business elite and the political
elite. An important application of the principle of equidependency is that
capitalism can function beneficently only in a society where money cannot
buy everything, because if it can, then the power of wealth can have no
counterweight and a parasitic involution ensues." - Stanislav Andreski
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---