Hello.

I would like to detect when an access to a mapped slot issues a SQL query. Is
that possible with events? Where should I look?

I want to unit-test that a query correctly preloads everything I need:

    def some_test(self):
        q = ...
        rows = q.all()
        print "#### Should not emit any SQL from here on ####"
        for each in rows:
            print each.a.b.c.d # Assert this does not emit any SQL

I currently "test this manually" by looking at the output and see that no SQL
communication was printed after the line "#### ... ####" (db engine is started
with echo=True).


Thank you,

Ladislav Lenart

-- 
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.

Reply via email to