Some time ago I had a problem with psycopg and Quixote - the database
changes made by one Quixote process were not visible to the other one.
I solved it by using connection.commit() after each SELECT statement.
Now I'm facing the same problem with SQLObject (using psycopg driver).
Before digging into the driver code, I wanted to ask -- am I correct
that there is no commit() after select? Is there a simple way to
From: Charles Brandt <lists@st...> - 2004-11-13 19:08:41
> Now I'm facing the same problem with SQLObject (using psycopg driver).
> Before digging into the driver code, I wanted to ask -- am I correct
> that there is no commit() after select? Is there a simple way to
> implement it?
I was under the impression that commits happen automatically under
SQLObject, unless you are using transactions.
However, since you mentioned multiple processes, I have run into problems
where a SQLObject cache in one process will not know that a commit has
occurred and will show the cached (stale) object instead. To get around
this in Quixote I expire all SQLObject caches at the end of every request.
I'm not sure if the high level function to do this has been fixed in recent
code. I use the following custom function which seems to get the job done.
accepts a DBConnection object and cycles through and expires
all cached items
for key in conn.cache.caches.keys():
for id in conn.cache.caches[key].allIDs():
Maybe thats not it at all though....