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

in operator should allow empty collection literals

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: ABNF
    • Labels:
      None
    • Proposal:
      Hide

      Enable empty collections in a literal expression for an in expression:

      listExpr = OPEN BWS [primitiveLiteral BWS *( COMMA BWS primitiveLiteral BWS )] CLOSE

      Show
      Enable empty collections in a literal expression for an in expression: listExpr = OPEN BWS [primitiveLiteral BWS *( COMMA BWS primitiveLiteral BWS )]  CLOSE
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-abnf/pull/53

      Description

      Currently, the ABNF requires that a collection literal used in an "in" clause requires at least one element:

       

      inExpr = RWS "in" RWS ( listExpr / commonExpr )

      listExpr = OPEN BWS primitiveLiteral BWS *( COMMA BWS primitiveLiteral BWS ) CLOSE

       

      There may be scenarios in which the user intends to provide an empty collection (for example, to reflect that there are no items selected in a drop-down list box). This should evaluate to false.

      Also, note that commonExpr may be empty, so it would seem we should have equal expressivity between commonExpr and listExpr

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: