Groups
Groups
Sign in
Groups
Groups
sqlalchemy
Conversations
About
Send feedback
Help
getting raw of the query
14 views
Skip to first unread message
Yusufjon Ahmedov
unread,
Dec 8, 2022, 9:31:56 AM
12/8/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlalchemy
how to get
raw
query of each
sqlalchemy session orm
in db file:
for example in db.py file
the raw of the executing query has to be taken
Michael Bayer
unread,
Jan 4, 2023, 7:17:34 PM
1/4/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlalchemy
using logging is the most direct way, however if you want to programmatically intercept all SQL you can use before_cursor_execute:
https://docs.sqlalchemy.org/en/14/core/events.html#sqlalchemy.events.ConnectionEvents.before_cursor_execute
Reply all
Reply to author
Forward
0 new messages