Thanks, Michael. We're now doing something similar to your suggestion:
monkey-patching Session.flush() to check len(Session.dirty) == 0. This
seems to work OK.
We can't rely on read-only DB-level users because we also use sqlite
for testing purposes, and we'd like to catch errors there too
On Nov 6, 2010, at 2:13 PM, Yang Zhang wrote:
Thanks, Michael. We're now doing something similar to your suggestion:
monkey-patching Session.flush() to check len(Session.dirty) == 0. This
seems to work OK.
We can't rely on read-only DB-level users because we also use sqlite
for testing
Hi, we're building an application where we're distinguishing strictly
between read-only and read-write transactions, so we'd like to (as a
sanity measure) ensure that we're not inadvertently doing any writing
from the read-only sections.
What's the simplest way to catch writes with sqlalchemy?
On Nov 5, 2010, at 8:48 PM, Yang Zhang wrote:
Hi, we're building an application where we're distinguishing strictly
between read-only and read-write transactions, so we'd like to (as a
sanity measure) ensure that we're not inadvertently doing any writing
from the read-only sections.