Steve Zatz wrote:
> And what is the approach to the simpler question of determining what joins
> are in a query.
>
> For example,
>
> query = session.query(Task).join(Context)...
>
> If you're just passed the query, what's the best way to determine that it
> contains a join (for example, so you don't perform the same join again)?
well I showed the "visitor" example towards the goal of illustrating a
generalized solution to "finding" things. just change "table" to "join".
myjoins = set()
visitors.traverse(mystmt, {'join':myjoins.add})
>
> Steve
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---