I created a table using join()
q = db_session.query(Email).join(Candidate)
Is there a way to print out either the contents of q or the columns?
I created a table using join()
q = db_session.query(Email).join(Candidate)
Is there a way to print out either the contents of q or the columns?
Sure, .join() produces a new Query object which you can inspect via .column_descriptions and .statement:
print(q.column_descriptions)
print(q.statement)
There is more to how you can inspect the query, please see: