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

Consider using matrix parameters for filter segments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: No Action
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: Protocol, URL Conventions
    • Labels:
      None
    • Resolution:
      Hide

      No action, proposal rejected

      Show
      No action, proposal rejected

      Description

      In 4.01 CS01, we introduced the ability to insert a filter into a path using a special "filter path segment" of the form

      Customers/$filter=@q/myns.action?$@q=Age gt 18

      (see https://issues.oasis-open.org/browse/ODATA-836)

      It turns out, the facility to append parameter information to a segment was considered over 20 years ago by Tim Berners-Lee using "matrix parameters" (http://www.w3.org/DesignIssues/MatrixURIs.html) – basically, a matrix parameter is a way to add parameters to a path segment as a series of key-value pairs separated from the path segment with a semi-colon.

      4.01 CS01 syntax:
      Customers/$filter=@q?$@q=name eq 'Smith'
      Matrix parameter syntax:
      Customers;$filter=@q?$@q=name eq 'Smith'

      Advantages of using matrix parameters:
      1) No possible ambiguity with key-as-segment
      2) Not inventing something new
      3) May already be supported by some systems

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: