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

substring: Define negative index for substring function

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA02
    • Fix Version/s: V4.01_WD01
    • Component/s: URL Conventions
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      In ODATA-781 we defined that a negative index in substring is explicitly undefined, since we did not define a behavior and there were at least two valid interpretations, and that interoperable clients should not use negative indexes.

      In 4.01, we agreed that negative indexes should mean count from the end.

      in particular, substring(string,-n,m) is equivalent to substring(string,length(string)-n,m)

      Show
      In ODATA-781 we defined that a negative index in substring is explicitly undefined, since we did not define a behavior and there were at least two valid interpretations, and that interoperable clients should not use negative indexes. In 4.01, we agreed that negative indexes should mean count from the end. in particular, substring(string,-n,m) is equivalent to substring(string,length(string)-n,m)
    • Resolution:
      Show
      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/59028/odata-v4.01-wd01-part1-protocol.docx https://www.oasis-open.org/apps/org/workgroup/odata/download.php/59029/odata-v4.01-wd01-part2-url-conventions.docx

      Description

      This could be a "bad request" returning no results at all, or it could evaluate to null, which may just lead to excluding the offending instance from the result.

      Or a mix of both: negative start index is "bad request", start index or desired length beyond the end of the first argument is "null".

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: