On Wednesday 07 November 2007 19:33:22 Michael Bayer wrote:
> oh....youre *extending* abstractclauseprocessor ??? 
 
> well yes, thats 
> going to change things quite a bit.  I think you should study ACP
> in its current form; what its doing now is faithfully calling
> convert_element() for *every* element in the expression, and also
> is not copying any elements before calling convert_element() -
> convert_element() always gets components from the original clause
> only.   if convert_element() returns non-None, the resulting
> element is assembled into the output, and traversal *stops* for the
> remainder of that element.  this is different behavior than it was
> before.  the reason it stops for a replaced element is because its
> assumed that the replacement value is not part of the expression
> which is being copied, and therefore should not be copied or
> processed itself.  if its that second part of the behavior thats
> breaking it for you, we can add an option to switch it off (comment
> out line 156, stop_on.add(newelem) to produce this).
this did not change things, the column is still not traversed. 
maybe something else also has to be changed.

i want a copy of original expression, where certain things are 
replaced by my things, and no need to go inside them - so this 
stop_on as u describe is okay... unless: what u mean remainder? that 
the returned element is not further traversed (thats ok), or the 
parent of that element is not traversed anymore (not ok)?


> this new version of ACP can locate things besides just plain Table,
> Alias and Column objects; it can locate things like Joins embedded
> in a clause which match the target selectable.
>
> On Nov 7, 2007, at 10:45 AM, svilen wrote:
> > On Wednesday 07 November 2007 16:57:08 Michael Bayer wrote:
> >> On Nov 7, 2007, at 2:03 AM, [EMAIL PROTECTED] wrote:
> >>> - something changed in the traversing (AbstractClauseProcessor
> >>> - r3727)
> >>> and it does not find proper things...
> >>
> >> ACP has been entirely rewritten.   if you can provide simple
> >> tests in the form that theyre present in test/sql/generative.py
> >> and/or test/sql/ selectable.py that would be helpful.  I have a
> >> feeling its not "missing" things, its just doing it slightly
> >> differently.
> >
> > http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc
> >/aggregator/ (no it does not need dbcook)
> > $ cd ....dbcook/misc/aggregator/tests
> > $ PYTHONPATH=$PYTHONPATH:../.. python convertertest.py
> >
> > ...
> > ====================================================
> > FAIL: count tags per movie
> >  File "tests/convertertest.py", line 73, in
> > test1_count_tags_per_movie['oid']) ...
> > AssertionError: ['oid'] != ['tabl', 'oid']
> > ====================================================
> > FAIL: count tags per movie
> >  File "tests/convertertest.py", line 73, in
> > test1_count_tags_per_movie['oid']) ...
> > AssertionError: ['oid'] != ['tabl', 'oid']
> >
> > ----------------------------------------------------
> > i did print the interesting elements in my
> > Converter.convert_element(), and the result is that
> > a) order is slightly different - which i dont care
> > b) 1 item is not traversed in r3727
> > e.g.
> >
> > r3626:
> >> Column tags.tabl
> >> Column tags.oid
> >> Column movies.id
> >> Column tags.tabl
> >> Column tags.oid
> >> Column movies.id
> >> Column users.id
> >> Column userpics.uid
> >> Column userpics.state
> >
> > ....
> >
> > r3627:
> >> Column tags.tabl
> >> Column tags.oid
> >> Column movies.id
> >> Column tags.oid
> >> Column movies.id
> >> Column users.id
> >> Column userpics.uid
> >> Column userpics.state
> >
> > the 2nd tags.tabl is missing, hence the assertFails
> >
> > ciao
> > svilen
>
> 


--~--~---------~--~----~------------~-------~--~----~
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