Hi,

>>4) I'm considering submitting a patch to make _CompoundClause.compare
>>tell you if the clause has the same semantics as the comparison (at  
>>    
>>
>im curious how this function would work for more complex situations,  
>i.e. with more operators, more levels of nesting, etc. without re- 
>implementing a full SQL expression parser.  
>
Well, with a change to _BinaryClause as well, it can work in 99% of 
situations. You have a set of operators that are known to be commutative 
and if the operator is commutative, you do an order-insensitive compare.

One case that would be a real pain: is "x < 10" equal to "10 > x"

>still curious as well why this is needed.
>  
>
Ok, the issue was noticed due to a unit test failure 
(engine.reflection.ReflectionTest.testcompositefk) where the test checks 
if the condition created by the join matches the condition it knows. The 
test was incorrectly failing because the order is different.

Your call - do I just get the test working the simple way, or it this 
"semantic compare" worth doing?

Paul

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