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

In should support empty literal arrays

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.02
    • Component/s: ABNF
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Update listExpr in ABNF:

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

      Call out that this evaluates to false.
      Be clear that this was added in 4.02.

      Show
      Update listExpr in ABNF: listExpr = OPEN BWS [primitiveLiteral BWS *( COMMA BWS primitiveLiteral BWS )] CLOSE Call out that this evaluates to false. Be clear that this was added in 4.02.

      Description

      [ABNF] defines the inexpr as:

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

      where listExpr is defined as:

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

      meaning, the list must have at least one primitive literal.

      Client code generating the expression may well write the open paren, loop through the elements of the array writing each into the expression, then write a close paren. If the array is empty, this will result in an empty listExpr.

      Any reason not to allow an empty listExpr and force the client code above to handle this as a special case?

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: