Generate string constants for field names in IDL

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.5.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Platforms 2017-05-08
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      IDL consumers may need to reference the field names in code. To enable one definition for a field name, IDL should generate string constants for each field name in a class.

      For a document like this

      {
         "example" : "test"
      }
      

      A mockup of what the generated code could look like:

      class Sample {
      constexpr StringData kExampleField = "example";
      }
      

      The idea came from judah.schvimer for SERVER-28621.

              Assignee:
              Mark Benvenuto
              Reporter:
              Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: