[SERVER-73138] Support variants of complex types in IDL Created: 20/Jan/23  Updated: 06/Dec/23  Resolved: 03/Feb/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Sean Zimmerman Assignee: Sean Zimmerman
Resolution: Fixed Votes: 0
Labels: milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-83931 IDL generates code that depends on fi... Backlog
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-02-06
Participants:

 Description   

Currently IDL code generation only supports variants of simple types (int, bool, etc). We want to expand this to support variants of used defined structs. Per Mark's recommendation we do not need to support a perfect generation, only what we consider necessary. It should be sufficient to say that the structs in a variant must all have a unique first element (which can be viewed by BSON.firstElement) to determine what the type of the variant is



 Comments   
Comment by Githook User [ 03/Feb/23 ]

Author:

{'name': 'seanzimm', 'email': 'sean.zimmerman@mongodb.com', 'username': 'seanzimm'}

Message: SERVER-73138 Support IDL Variants of Multiple Structs
Branch: master
https://github.com/mongodb/mongo/commit/233b11e209052e7f7fe8854433f4c85ca8cf1485

Generated at Thu Feb 08 06:23:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.