Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51369

Add "variant" type to IDL syntax

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: IDL
    • None
    • Fully Compatible
    • Repl 2021-01-11, Repl 2021-01-25, Repl 2021-02-08

      This new type represents a union of multiple types. For example:

      structs:
        writeConcern:
          fields:
            w:
              type:
                  # The "w" field accepts a string or an int
                  variant: [string, int]
      

      Add tests for the "variant" type in test_parser.py and test_generator.py, following the examples of the existing types.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: