On Thu, Jun 06/27/13, 2013 at 05:27:36PM -0400, Michael Bayer wrote:
> Ok how about you connect() at the start of things, then use that Connection 
> as your "bind" ?  rather than using odd pools.
I'm not exactly sure how to approach that and still use the session at
the same time, but I'll play around with it and see what happens.

> On Jun 27, 2013, at 5:26 PM, Ryan Kelly <rpkell...@gmail.com> wrote:
> 
> > 
> > On Thu, Jun 06/27/13, 2013 at 05:14:30PM -0400, Michael Bayer wrote:
> >> what kind of pooling are you using?   
> > 
> > StaticPool. I'm creating temporary tables over the connection and
> > without StaticPool I end up with a new connection and my temporary
> > tables are nowhere to be found.
> > 
> >> normally connect() should return a new connection independent of any 
> >> other.   Only the StaticPool and the SingletonThreadPool, both very 
> >> special use pools, have any notion of sharing the same connection for 
> >> multiple connect() calls (or if you're using the ThreadLocal engine, which 
> >> is highly unusual).    These pools are never used by default unless you 
> >> use a SQLite :memory: engine in which case it uses SingletonThreadPool.
> >> 
> >> The rationale for the call is so that elements which are initialized the 
> >> first time the Engine connects, such as "default_schema_name", are 
> >> available.   The call could be conditionalized.
> >> 
> >> On Jun 27, 2013, at 3:05 PM, Ryan Kelly <rpkell...@gmail.com> wrote:
> >> 
> >>> Attempting to use Inspector.from_engine to get a list a table names from
> >>> the database. Running the test suite of a large program I found that my
> >>> data would disappear. After digging around in my own code for a few
> >>> hours trying to find the problem, I tracked it down to the call to
> >>> Inspector.from_engine, and inside I see this:
> >>> 
> >>> if self.engine is bind:
> >>>   # if engine, ensure initialized
> >>>   bind.connect().close()
> >>> 
> >>> It seems to be the cause of the ROLLBACK.
> >>> 
> >>> I'm not sure why this is necessary. Thoughts?
> >>> 
> >>> -Ryan
> > 
> > -Ryan

-Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to