so the built-in way to do one-offs like these w/ an ORM session is like
this:
conn = session.connection()
conn.detach()
conn.execute("set session isolation <whatever>")
< work with connection>
what detach() does means it's going to throw away the DBAPI connection
when we're done with it, it won't be used again. This might be all you
need, or then you might need to do this a lot and don't want to degrade
the efficiency of the connection pool.
The other way public-API wise is to use events, e.g. like checkin
events, to reset the isolation level when the connection comes back to
the pool. There's some internal systems that do this also which I'm
sure you've noticed, poking around at them I think the idea of a way to
add custom ad-hoc isolation settings which get reset by the usual
"reset_isolation_level" hook might be handy. I'm still underwater
with work meetings all week this week so if you can ping me w/ the code
you were working on towards the end of the week maybe we can look at
that possibility.
>
> --
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
sqlalchemy+...@googlegroups.com
> <mailto:
sqlalchemy+...@googlegroups.com>.
> To post to this group, send email to
sqlal...@googlegroups.com
> <mailto:
sqlal...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/sqlalchemy.
> For more options, visit
https://groups.google.com/d/optout.