Is there a way to view the INSERT command the sqlalchemy is about to execute?
My scenario is as follow:
- adding an object to the session -
session.add(my_obj)
- executing the insert by calling -
session.flush()
I know how to view the content of a SELECT request:
print(q.statement.compile(compile_kwargs={"literal_binds": True}))
thanks to: How do I get a raw, compiled SQL query from a SQLAlchemy expression?