[rules-users] Re: No OR syntax
Mark Proctor
mproctor at codehaus.org
Sun Jul 8 18:29:48 EDT 2007
The 'in' operator is just sugar for == 'stilton' || == 'brie' but we
felt it improved the declarative nature of the language sufficiently to
warrant the sugar.
Mark
Ronald R. DiFrango wrote:
> Nice; an in operator just like SQL :-)
>
> On 7/7/07, *Mark Proctor* <mproctor at codehaus.org
> <mailto:mproctor at codehaus.org>> wrote:
>
> Sorry it's now && and ||
> You can also us the 'in' operator
> Cheese( type in ( 'stilton', 'brie' ))
> Cheese( type not in ( 'stilton', 'brie' ))
> Cheese( type memberOf $myCheeseTypeList )
> Cheese( type not memberOf $myCheeseTypeList )
>
> Mark
>
> Ronald R. DiFrango wrote:
>> Answered my own question:
>>
>> MyObject (status == StatusConstants.MATCHED | ==
>> StatusConstants.APPROVAL)
>>
>> On 7/7/07, *Ronald R. DiFrango* < ron.difrango at gmail.com
>> <mailto:ron.difrango at gmail.com>> wrote:
>>
>> All,
>>
>> If I remember correctly, in the 4.x version of Drools you
>> were adding an or type syntax where you could compare a value
>> against multiple values. What is the new syntax for it?
>>
>> I am looking to do something logically like:
>>
>> MyObject (status in ("Open" or "Matched")
>>
>> Ron
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rules-users mailing list
>>
>> rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>> <https://lists.jboss.org/mailman/listinfo/rules-users>
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070708/409cb25d/attachment.html
More information about the rules-users
mailing list