How can I see the SQL generated by ponyorm?

In this example:

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

      

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

+3


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



+3


source







All Articles