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

Add Capability term for filter expression restrictions

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      Extend the term FilterRestriction with an additional property FilterExpressionRestrictions:

      <Term Name="FilterRestrictions" Type="Capabilities.FilterRestrictionsType" AppliesTo="EntitySet">
      <Annotation Term="Core.Description" String="Restrictions on $filter expressions" />
      </Term>
      <ComplexType Name="FilterRestrictionsType">
      ...
      <Property Name="FilterExpressionRestrictions" Type="Collection(Capabilities.FilterExpressionRestrictionType)">
      <Annotation Term="Core.Description" String="These properties only allow a subset of expressions" />
      </Property>
      </ComplexType>
      <ComplexType Name="FilterExpressionRestrictionType">
      <Property Name="Property" Type="Edm.PropertyPath" />
      <Property Name="AllowedExpressions" Type="Capabilities.FilterExpressionType" />
      </ComplexType>
      <EnumType Name="FilterExpressionType"> <!-- rewrite as allowable values for future extensibility-->
      <Member Name="SingleValue">
      <Annotation Term="Core.Description" String="Property can be used in a single eq clause" />
      </Member>
      <Member Name="MultiValue">
      <Annotation Term="Core.Description" String="Property can be used in a single in clause" />
      </Member>
      <Member Name="SingleRange">
      <Annotation Term="Core.Description"
      String="Property can be used in at most one ge and/or one le clause, separated by and" />
      </Member>
      </EnumType>

      NOTE: the enum should be rewritten as allowable values for future extensibility.

      Show
      Extend the term FilterRestriction with an additional property FilterExpressionRestrictions: <Term Name="FilterRestrictions" Type="Capabilities.FilterRestrictionsType" AppliesTo="EntitySet"> <Annotation Term="Core.Description" String="Restrictions on $filter expressions" /> </Term> <ComplexType Name="FilterRestrictionsType"> ... <Property Name="FilterExpressionRestrictions" Type="Collection(Capabilities.FilterExpressionRestrictionType)"> <Annotation Term="Core.Description" String="These properties only allow a subset of expressions" /> </Property> </ComplexType> <ComplexType Name="FilterExpressionRestrictionType"> <Property Name="Property" Type="Edm.PropertyPath" /> <Property Name="AllowedExpressions" Type="Capabilities.FilterExpressionType" /> </ComplexType> <EnumType Name="FilterExpressionType"> <!-- rewrite as allowable values for future extensibility--> <Member Name="SingleValue"> <Annotation Term="Core.Description" String="Property can be used in a single eq clause" /> </Member> <Member Name="MultiValue"> <Annotation Term="Core.Description" String="Property can be used in a single in clause" /> </Member> <Member Name="SingleRange"> <Annotation Term="Core.Description" String="Property can be used in at most one ge and/or one le clause, separated by and" /> </Member> </EnumType> NOTE: the enum should be rewritten as allowable values for future extensibility.
    • Resolution:
      Show
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Capabilities.V1.xml?op=diff&rev=718&sc=0

      Description

      We regularly encounter situations where filter expressions on certain properties are restricted to

      • single-value: only a single “eq”clause is possible
      • multi-value: several “eq” clauses, separated by or, are possible
      • interval: at most one “ge” and one “le” clause, separated by “and”, alternatively a single “eq” clause

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: