4

In this example:

with db_session:
    p = select(_ for _ in Person in _.name == 'John')[:][0]

I need this for debugging purposes, since I would like to see the SQL it generates to a similar query in other ORMs.

4

1 回答 1

4

One can use pony.orm.sql_debug(True). This will show you all the SQL that pony generates whenever one is in a transaction. Debugging SQL in Pony

于 2014-10-10T12:24:29.057 回答