Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-72

Describe any() and all() lambda filter expressions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: URL Conventions
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Add sections

      5.1.1.5 Lambda Operators
      OData defines two operators that evaluate a boolean expression on a collection of entities or complex type instances. Both must be prepended with a navigation path that identifies a collection.

      5.1.1.5.1 any
      The any operator applies a boolean expression to each member of a collection and evaluates to true if the expression is true for any member of the collection. As a special case the boolean expression may be empty, in which the any operator evaluates to true if the collection is not empty.

      For example:

      http://services.odata.org/Northwind/Northwind.svc/Orders?$filter=Order_Details/any(d:d/Quantity gt 10)

      Returns all Orders that have any Orderlines with a Quantity greater than 10.

      5.1.1.5.2 all
      The all operator applies a boolean expression to each member of a collection and evaluates to true if the expression is true for all members of the collection.

      For example:

      http://services.odata.org/Northwind/Northwind.svc/Orders?$filter=Order_Details/all(d:d/Quantity gt 10)

      Returns all Orders that have only Orderlines with a Quantity greater than 10.

      Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47861/latest/odata-meeting-20_on-20130110-minutes.html

      Show
      Add sections 5.1.1.5 Lambda Operators OData defines two operators that evaluate a boolean expression on a collection of entities or complex type instances. Both must be prepended with a navigation path that identifies a collection. 5.1.1.5.1 any The any operator applies a boolean expression to each member of a collection and evaluates to true if the expression is true for any member of the collection. As a special case the boolean expression may be empty, in which the any operator evaluates to true if the collection is not empty. For example: http://services.odata.org/Northwind/Northwind.svc/Orders?$filter=Order_Details/any(d:d/Quantity gt 10) Returns all Orders that have any Orderlines with a Quantity greater than 10. 5.1.1.5.2 all The all operator applies a boolean expression to each member of a collection and evaluates to true if the expression is true for all members of the collection. For example: http://services.odata.org/Northwind/Northwind.svc/Orders?$filter=Order_Details/all(d:d/Quantity gt 10) Returns all Orders that have only Orderlines with a Quantity greater than 10. Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47861/latest/odata-meeting-20_on-20130110-minutes.html
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/48274/odata-core-v4.0-wd01-part2-url-conventions-2013-02-12-RH.doc Accepted: https://www.oasis-open.org/committees/download.php/48549/odata-meeting-29_on-20130314-minutes.html#odata-72

      Description

      These expressions are currently only mentioned in the ABNF, without a semantic description or examples in the URL Conventions

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: