How can I see the SQL generated by ponyorm?

In this example:

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


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


source to share

1 answer

You can use pony.orm.sql_debug(True)

. This will show you all the SQL that pony generates whenever you are in a transaction. Debugging SQL in Pony



All Articles