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

Cast between enumeration types and integer types

    XMLWordPrintable

    Details

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

      Applied

    • Proposal:
      Hide

      Casting between enumeration types and integer types (of sufficient width) is possible based on the numeric value.

      This cast MUST be explicit, using the cast() function in URLs or the cast expression in CSDL.

      Call this out in URL Conventions, section 5.1.1.10.1 cast.

      Preferred wording: Services MAY support casting enumeration members to the underlying numeric values using the explicit cast function.

      Show
      Casting between enumeration types and integer types (of sufficient width) is possible based on the numeric value. This cast MUST be explicit, using the cast() function in URLs or the cast expression in CSDL. Call this out in URL Conventions, section 5.1.1.10.1  cast . Preferred wording: Services MAY support casting enumeration members to the underlying numeric values using the explicit cast function.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/64118/odata-v4.01-wd06-part2-url-conventions-2018-10-19.docx  

      Description

      Enumeration members have an explicit or (only in CSDL XML) implicit numeric value.

      Sorting and comparison of enumeration members is based in this numeric value.

      Unfortunately casting between enumeration types and integer types is not yet defined.

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo (Inactive)
              Reporter:
              handl Ralf Handl
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: