>> ahha. so i am replacing one whole subexpr with somthing, and the
>> original subexpr is not traversed inside.
>> if i comment the stop_on.add(), it attempts to traverse the result
>> subexpr, not the original one.
>> i want the original to be traversed. Something like doing onExit
>> instead of current onEntry.
>> if its too hard, i can probably traverse it twice, once just marking ,
>> 2nd time replaceing things? i'll try
>>     
> if youre replacing a subtree, why would you want to then traverse that  
> part of the subtree which was replaced ?  
because as i said, the needed work is onExit of the nodes, i.e. "all 
room/building is traversed, now what u want to make out of it?" thus i 
can traverse only once.
> can you see why how i have  
> it working now is reasonably straightforward ?  perhaps a second call  
> to ACP.traverse() should be called for those elements which were  
> replaced.
i did change my code to traverse all twice, once doing nothing, and once 
replaceing; it works. speed there is not an issue.
Still, if u can make the onEntry/onExit/both switchable, that would be 
usable. Maybe not immediately, but i'm sure once day you'll need it. 
Right now, it is onEntry, and the actual code/choice is not done 
clearly, it is spread between traverse() and _convert_element() and similar.

Has anything changed on plain ClauseVisitor? coz' i have (more 
important) other code elsewhere, which also breaks at same r3727 - it's 
today topic of digging.
>   also r3754 fixes the issue that aliased selects, while  
> being traversed, were not being copied properly.  i still need to  
> tweak the rules for aliases (alised tables, for example, remain  
> immutable).
>   
i dont really understand why u need the ACP being so different to plain 
visitor; i mean cant they share some skeleton part of traversing, while 
putting all the choices (visit* vs convert; onentry/onexit; stop/dont) 
in their own parts.
After all, visitor pattern is twofold,  a) Guide + b) Visitor; the Guide 
doing traversing, the Visitor noting things; choice where to go might be 
in visitor and/or in guide. some times (one extreme) the visitor is just 
one dumb functor; other cases (other extreme end)  the visitor is very 
sofisticated and even does guiding/traversing.
Here it looks more like second case, u have most of both sides put in 
the Visitor, and only small part (specific visit_* / copy_internals) 
left to the actual nodes.
And to me, the skeleton is still same between ACP and ClauseVisitor.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to