i.e. the operator is a function:

my_binary = column('foo') == column('bar')

my_new_binary = my_binary.operator(my_binary.left, my_binary.right)

make sense ?



Hinrich Winther wrote:
> Maybe there is a better way of doing it. To be exact:
>
> I want to disassemble a given _BinaryExpression into basic elements (a
> list of strings, arrays, integers ...) and reassemble it somewhere
> else out of this basic elements.
>
>
>
>
>
> On 01.04.2009, at 18:14, Michael Bayer wrote:
>
>>
>> Hinrich Winther wrote:
>>> Hi,
>>>
>>> I need to generate a sqlalchemy.sql.expression._BinaryExpression by
>>> hand. So I looked into the docu and found that I need a left, right
>>> and a operator. I am stuck at the left :) type() says it is a
>>> sqlalchemy.sql.util.AnnotatedColumn. But I can't find the class
>>> definition anywhere in sqlalchemy. Where is it defined?
>>>
>>
>>
>> if you just say column('foo') == column('bar') (column is
>> sqlalchemy.sql.column), you've got a _BinaryExpression.   there
>> shouldn't
>> be a need to access _BinaryExpression directly.
>>
>>
>>
>> >>
>
>


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

Reply via email to