I’ve read through the query docs and don’t see anywhere if there is a way to get the tablename from a query– e.g. if I have q = query(Users), can I get Users back out from q?
I’ve read through the query docs and don’t see anywhere if there is a
Share
Please note that event simple query like yours may involve other table then Users too in case when they are related. So you’ll need to iterate over it.
The following should do what you need
.selectable.locate_all_froms():Will result in something like that:
This should work for query build from Mapped object and also for query build from Table object.