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

Specify which nested query options can be used when expanding only references, and adapt syntax

    XMLWordPrintable

    Details

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

      [Applied]

    • Proposal:
      Hide

      Change syntax to

      $epand=NavProp/$ref(<nested options>)

      and define a different set following $ref than the one directly following the navigation property:

      expand = '$expand' EQ expandItem *( COMMA expandItem )
      expandItem = [ qualifiedEntityTypeName "/" ] navigationProperty
      [ "/" qualifiedEntityTypeName ]
      [ ref OPEN expandRefOption *( SEMI expandRefOption ) CLOSE
      / OPEN expandOption *( SEMI expandOption ) CLOSE ]
      expandRefOption = filter
      / search
      / skip
      / top
      / inlinecount
      expandOption = expandRefOption
      / select
      / orderby
      / expand
      / levels

      Rationale: we now express in the ABNF what is meaningful and thus allowed after /$ref.

      Also this allows parsing from left to right.

      And putting /$ref before the parens makes it a bit more obvious. Just try reading

      $expand=Items($filter=something very complicated and lengthy and I'll only tell you afterwards that I only want)/$ref&andsoon

      Show
      Change syntax to $epand=NavProp/$ref(<nested options>) and define a different set following $ref than the one directly following the navigation property: expand = '$expand' EQ expandItem *( COMMA expandItem ) expandItem = [ qualifiedEntityTypeName "/" ] navigationProperty [ "/" qualifiedEntityTypeName ] [ ref OPEN expandRefOption *( SEMI expandRefOption ) CLOSE / OPEN expandOption *( SEMI expandOption ) CLOSE ] expandRefOption = filter / search / skip / top / inlinecount expandOption = expandRefOption / select / orderby / expand / levels Rationale: we now express in the ABNF what is meaningful and thus allowed after /$ref. Also this allows parsing from left to right. And putting /$ref before the parens makes it a bit more obvious. Just try reading $expand=Items($filter=something very complicated and lengthy and I'll only tell you afterwards that I only want)/$ref&andsoon
    • Resolution:
      Show
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-construction-rules-v4.0-wd01.txt?rev=253 https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-testcases.xml?rev=253 Accepted: https://www.oasis-open.org/committees/download.php/49055/odata-meeting-35_on-20130502-minutes.html#odata-345

      Description

      $expand allows nesting query options after the name of the navigation properties to be expanded.

      When expanding only references $select, $expand, and $levels don't make sense as neither structural nor navigation properties are represented in references.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: