OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-556) Add "in" operator as syntactic sugar for a chain of "or" expressions


    [ https://issues.oasis-open.org/browse/ODATA-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60762#comment-60762 ] 

Michael Pizzo commented on ODATA-556:
-------------------------------------

group favors 1)b).
Clarified that the right side could be an expression that resulted in a collection of the appropriate type.
Rules for types should be same as any/all (which doesn't seem to limit the type of member in the collection).
Upon further discussion, we think that 2) may be allowed today. "in" should have the same semantics.

> Add "in" operator as syntactic sugar for a chain of "or" expressions
> --------------------------------------------------------------------
>
>                 Key: ODATA-556
>                 URL: https://issues.oasis-open.org/browse/ODATA-556
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData URL Conventions
>    Affects Versions: V4.0_CSD03
>         Environment: New Query Capabilities
>            Reporter: Ralf Handl
>            Assignee: Ralf Handl
>              Labels: GoodIdea, Usability
>             Fix For: V4.01_WD01
>
>
> In data analysis it is common to retrieve data that matches one of several distinct values, reflected in SQL as the IN operator.
> This is syntactic sugar, so we need to balance between a convenient notation and adding value to the expression syntax that we already have.
> 1) Using JSON collections and a new "in" operator:
>     CountryCode in ["US","CA","DE"]
> or in a more URL-friendly notation (as double quotes and square brackets require percent-ending)
>     CountryCode in ('US','CA','DE')
> 2) Allowing arbitrary collection expressions on the left side of lambda expressions:
>     ["US","CA","DE"]/any(c:c eq CountryCode)
> 3) Adding an overload to the contains function:
>     contains(["US","CA","DE"], CountryCode)



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]