in operator should allow empty collection literals

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • V4.01_ERRATA01
    • Affects Version/s: V4.01_OS
    • Component/s: ABNF
    • None
    • 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
    • Show
      https://github.com/oasis-tcs/odata-abnf/pull/53

      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

            Assignee:
            Unassigned
            Reporter:
            Michael Pizzo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: