I just changed the inheritance of BooleanExpression to be from
BinaryExpression so it retains all the semantics of a
BinaryExpression, rev 2217. this required a slight tweak in the
orm's Query.select() method to properly detect a "where" criterion
but was otherwise not a big deal.
On Jan 19, 2007, at 10:11 AM, King Simon-NFHD78 wrote:
Hi,
I don't know if this is valid SQL, but MySQL seems to accept it... I'd
like to write a query that looks like:
SELECT s.result LIKE 'Pass%' AS pass
...
Which would return 1 or 0 for each row depending on whether the result
column begins with Pass. In SQLAlchemy this would become:
sa.select([s.c.result.startswith('Pass').label('pass')] ...)
Without the .label(), this works, but I can't label it because
BooleanExpressions don't have a label method.
Is there another way to do this?
Thanks,
Simon
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---