On Tue, Mar 22, 2011 at 4:27 PM, Michael Bayer <[email protected]> wrote: > On Mar 22, 2011, at 4:09 PM, Jay Pipes wrote: > >>> Running with "sqlite3" executes a brand new process with all new state, >>> whereas using "engine" uses a SQLite connection that has remained >>> established throughout the entire conversation. >> >> That was my whole point, Michael. Why doesn't the engine show the >> changes that were made to the SQLite database, but it *does* show the >> changes that were made to the MySQL database? Is this a case of the >> SQLite engine and MySQL engines differing on how they cache metadata? > > if you mean DBAPI + client libraries, that is what is suspected here. If you > mean the SQLAlchemy engine, no, SQLAlchemy does not cache anything regarding > table metadata, except for what's in the Table object itself. > > A workaround for your specific test would be to use NullPool with > create_engine() so that a new connection is procured for each > engine.execute().
That is actually what worked. using poolclass=NullPool in create_engine() in my test case fixed the problem. Not sure if that is a SQLAlchemy issue, a DBAPI driver issue with SQLite (probably) or no issue at all. :) Thanks for all your assistance, Michael! -jay -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
